Hello, I got a problem with with my header file.
It has an external reference to a function, which that function has a parameter that is predefined.
Here is the neccessary information the source file has (.cpp) followed by the header file (.h):
Source:
Code:
//...
int function(/*...*/, int number);
//...
int function(/*...*/, int number = 0)
{
//...
}
//...
Header:
Code:
//...
extern int function(/*...*/, int number = 0);
//...
Here is the error I recieve when I compile my program:
Code:
g++ -c p_datamanip.cpp p_error.h -g -W -Wall -ansi -pedantic `sdl-config --cflags --libs` -lSDL
p_datamanip.cpp: In function `int p_fileread_quote(std::string, std::string, std::string&, unsigned int)':
p_datamanip.cpp:115: error: default argument given for parameter 4 of `int p_fileread_quote(std::string, std::string, std::string&, unsigned int)'
p_datamanip.cpp:23: error: after previous specification in `int p_fileread_quote(std::string, std::string, std::string&, unsigned int)'
make: *** [p_datamanip.o] Error 1
What should I do?