need a help please
i was just working some problem on function overloading topic, i wrote a simple program to test the topic, but i got some errors which i couldn't able to recover it, can u please tell me what the error is... here is the program and the error message
and the error is as follow
void printdat(int, int, int, char = '\');
std::cout<<"Enter the date"<<endl;
void printdat(int dd, int mm, int yy, char a)
any help will be appreciated
1.cpp:4:37: missing terminating ' character
1.cpp:4:37: warning: multi-character character constant
1.cpp:5: parse error before `using'
1.cpp:15: `dd' was not declared in this scope
1.cpp:15: `mm' was not declared in this scope
1.cpp:15: `yy' was not declared in this scope
1.cpp:15: ISO C++ forbids declaration of `printdat' with no type
1.cpp:15: `int printdat' redeclared as different kind of symbol
1.cpp:14: previous declaration of `void printdat(...)'
1.cpp:15: initializer list being treated as compound expression
1.cpp:16: ISO C++ forbids declaration of `getchar' with no type
1.cpp:17: parse error before `return'
1.cpp: In function `void printdat(int, int, int, char)':
1.cpp:21: `void printdat(int, int, int, char)' redeclared as different kind of
1.cpp:15: previous declaration of `int printdat'
1.cpp:15: previous non-function declaration `int printdat'
1.cpp:21: conflicts with function declaration `void printdat(int, int, int,
sorry its the default paramaters program
If you want to use the \ as a character, you need to use \\.
it works fine now, thanks very much