I am having an issue with my function call
static classname *makeclass ( char ch, int x1, int y1, int x2, int y2){
cin >> ch >> x1 >> y1 >> x2 >> y2;
Ship **ptr = 0;
if ( ch != 'A' || ch != 'B' || ch != 'C' || ch != 'D'){
throw invalid_argument ("Error : invalid character input ");
}
else if ( ch == 'A'){
classname **ptr = new derivedclassname*[5];
for ( int i = 0 ; i < 5; i++){
ptr[i] = new derivedclass (x1,y1,x2,y2);
}
return *ptr;
}
return *ptr;
}
In my main file :
main () {
classname *p = classname::*makeclass ( x1,y1,x2,y2);
}
My error:
Ship.cpp:81:14: warning: ‘classname* makeclass(char, int, int, int, int)’ defined but not used [-Wunused-function]
static classname *makeclass ( char ch, int x1, int y1, int x2, int y2){
^
/tmp/cc1eUoXA.o: In function `main':
testclass.cpp:(.text+0xc1): undefined reference to `classname::makeclass(char, int, int, int, int)'