| | |
Error with getDate function
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
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
Views: 1149 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays assignment based beginner binary c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multidimensional multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search sort sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






