473,320 Members | 1,707 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,320 software developers and data experts.

Error C2660 Function does not take 1 argument

1
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 portion in Bold face is the line I get the error in).
Thnxs


class Party
{
private:
string str1;
string str2;
public:
Party(string n = "Bruce Willis", string a = "The BamBoo Cult")
{
str1 = n;
str2 = a;
}

void GetInfo();
void DisplayInfo();
};
void Party::GetInfo()
{
cout <<"Enter student name\n";
cin >> str1;
cout <<"\n\nPlease enter students fraternity or cult\n\n";
cin >> str2;
}
void Party::DisplayInfo()
{
if (str1.size() >= str1.size(15)) {
cout << "\n****************************************\n" ;
cout <<"\n " << str2 <<" \n";
cout <<" "<< str1 <<" \n";
cout <<"\n******************************************\n" ;
}
else
{
cout << "\n "<< str2 <<": " << str1;
}
}
int main()
{
Party PartyDay;

PartyDay.GetInfo();
PartyDay.DisplayInfo();
return 0;
}
Apr 2 '07 #1
1 10720
nmadct
83 Expert
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
It's just as the error says. The size() function doesn't take an argument. I've highlighted the argument that's causing the problem:

str1.size() >= str1.size(15)

I'm not sure what you were trying to do by using the 15 as an argument to size(), but what you want is probably this:

str1.size() >= 15
Apr 2 '07 #2

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

Similar topics

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: ...
0
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
3
by: raveneros | last post by:
error C2660: 'checkF' : function does not take 1 parameters this is the error. void checkF(char s,char dStr) { for (int i=0; i<count; ++i) if (strcmp(s, list.getId())==0) ...
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.