473,378 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

C++ error C2660

error C2660: 'checkF' : function does not take 1 parameters
this is the error.

Expand|Select|Wrap|Line Numbers
  1.     void checkF(char s[],char dStr[]) 
  2.     {
  3.       for (int i=0; i<count; ++i)
  4.           if (strcmp(s, list[i].getId())==0) 
  5.           {
  6.                 if (strcmp(dStr, list[i].getExpiryDate())==0)
  7.                  {
  8.                      cout<<endl;
  9.                         cout<<" "<<list[i].getName();
  10.                      cout<<" membership has expired! Please pay renewal fee of $120. Thank you"<<endl;
  11.                  }
  12.  
  13.           } 
  14.     }
  15.  
any help i will be very grateful
Mar 27 '07 #1
3 3403
svlsr2000
181 Expert 100+
error C2660: 'checkF' : function does not take 1 parameters
this is the error.

Expand|Select|Wrap|Line Numbers
  1.     void checkF(char s[],char dStr[]) 
  2.     {
  3.       for (int i=0; i<count; ++i)
  4.           if (strcmp(s, list[i].getId())==0) 
  5.           {
  6.                 if (strcmp(dStr, list[i].getExpiryDate())==0)
  7.                  {
  8.                      cout<<endl;
  9.                         cout<<" "<<list[i].getName();
  10.                      cout<<" membership has expired! Please pay renewal fee of $120. Thank you"<<endl;
  11.                  }
  12.  
  13.           } 
  14.     }
  15.  
any help i will be very grateful
Can you post the calling of this function. This error usually occurs when function is called with an incorrect number of parameters.
Mar 27 '07 #2
Expand|Select|Wrap|Line Numbers
  1.  
  2. class SnowCoMember {
  3.  public:
  4.  
  5.     void checkF(char s[],char dStr[]) 
  6.     {
  7.       for (int i=0; i<count; ++i)
  8.           if (strcmp(s, list[i].getId())==0) 
  9.           {
  10.                 if (strcmp(dStr, list[i].getExpiryDate())==0)
  11.                  {
  12.                      cout<<endl;
  13.                         cout<<" "<<list[i].getName();
  14.                      cout<<" membership has expired! Please pay renewal fee of $120. Thank you"<<endl;
  15.                  }
  16.  
  17.           } 
  18.     }
  19.  
  20.  private:
  21.    CoMember list[100];
  22.    int count;
  23. };
  24.  
  25. void main() {
  26.   SnowCoMember CoMem;
  27.   char dateStr [9];
  28.   char currentStr [9];
  29.   int year;
  30.   char choice;
  31.     _strdate(currentStr);
  32.     _strdate(dateStr);
  33.  
  34. do{
  35.       system("cls");
  36.       menu();
  37.       cin>>choice;
  38.               switch (choice)  {
  39.         case '1':
  40.             char s[30];
  41.                     cout<<endl<<"Enter member id: "<<endl;
  42.                     gets(s);
  43.             CoMem.checkF(s);
  44.             cout<<endl<<"Press enter to continue...."<<endl;
  45.             getch();
  46.         break;
  47.     }while (choice!='2');
  48. }
  49.  
this is not the complete code.
Mar 27 '07 #3
weaknessforcats
9,208 Expert Mod 8TB
case '1':
char s[30];
cout<<endl<<"Enter member id: "<<endl;
gets(s);
//
//Where's the second argument?
// VVVVVVVVVVVVVVVVVVVVV
CoMem.checkF(s);
cout<<endl<<"Press enter to continue...."<<endl;
getch();
Mar 27 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
4
by: Richard | last post by:
Hi All, I am using Visual C++ .Net to create a windows forms application and I am getting the following errors when I do a MessageBox::Show in my Form1.cpp file: Form1.cpp(19): error C2653:...
1
by: Andreas Poller | last post by:
Hello, I have the following problem: I have a class deriving from ICustomTypeDescriptor: public __gc class TPropertyBag : public ICustomTypeDescriptor { private: ...
1
by: Minx | last post by:
This seems like a cool site, I wish I could have found this sooner. Can someone pls help me with this line of code? I get an error C2660 telling me the function does not take an argument ( The...
1
by: unknownbomb | last post by:
Ok ty. Now this: 1>e:\documents and settings\user\desktop\d3d_starterkit_v3.0b\d3d8\main.cpp(125) : error C2660: '_vsnprintf_s' : function does not take 4 arguments Code: void __cdecl...
2
by: yalbizu | last post by:
#include <iostream> #include <string> #include <fstream> #include <iomanip> using namespace std; const int NO_OF_STUDENTS=20; struct studentType { string studentFName; string studentLName;
6
by: RedRuffing15 | last post by:
Hey, Im getting two C2660 Errors even though I have defined all my variables and such, and Im not sure why it isnt working, can anyone help me out? //Program Project 5 #include<iostream>...
1
by: denxx | last post by:
Hi, I am new in C++ and was trying to run a programme where I found an error using the pow statement. Error showed is error C2660: 'pow' : function does not take 1 parameters. As I have a square on...
10
by: charmeda103 | last post by:
My program keeps getting me and error and i dont why here is the error message error C2061: syntax error: identifier 'infile' error C2660: 'ReadDate' : function does not take 6 arguments...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.