| | |
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 |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






