| | |
Error with getDate function
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 16
Reputation:
Solved Threads: 0
C++ Syntax (Toggle Plain Text)
class Date { public : Date(); void getDate(int,string,int); private : int day; string mth; int year; };//end class //getdate void Date::getDate(int& inDay,string& inMth,int& inYear) const //error here { inDay=day; inMth = mth; inYear=year; }
I'm doing up a date class. Am doing a class function getDate to return back the day,mth and year through a reference variable. I am getting a compilation error and have been staring at my codes for a while. Can't seem to find where went wrong.
Could someone give me a help here please?
error message was, "void Date::getDate(int&, std::string&, int&) const' does not match any in class `Date' " and void Date::getDate(int, std::string, int)
Many thanks.
•
•
Join Date: Oct 2008
Posts: 16
Reputation:
Solved Threads: 0
i have tried putting
am still getting a compilation error. any other solution ?
error message is prototype for `void Date::getDate(int&, std::string&, int&) const' does not match any in class `Date'
void Date::getDate(int&, std::string&, int&)
C++ Syntax (Toggle Plain Text)
void getDate(int&, string& ,int&);
am still getting a compilation error. any other solution ?
error message is prototype for `void Date::getDate(int&, std::string&, int&) const' does not match any in class `Date'
void Date::getDate(int&, std::string&, int&)
Last edited by AcidG3rm5; Nov 13th, 2008 at 7:07 am.
![]() |
Similar Threads
- get html element value using php (PHP)
- help to debug my (C++)
- help to debug my code (C++)
- PHP's include function ??? (PHP)
- Long ado net question but urgent help required (ASP.NET)
- problem again (C)
- Exception Handling (C++)
- after a very unproductive day! - code bugs (C++)
Other Threads in the C++ Forum
- Previous Thread: Help on begginer project
- Next Thread: Compiling in VC++ 2008 Express
| Thread Tools | Search this Thread |
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count database delete deploy developer dll download dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph gui homeworkhelp iamthwee ifstream image input int java lib library linker list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






