Hello.. I am currently getting the same sort of errors and I believe it is something simple.. I am using multiple files to create a simulation..Any one have any insight to what these errors might be?
KillerWhale.hpp:9:26: error: cannot call constructor 'Penguin::move(char (*)[25], Fish**, int, Penguin**)::KillerWhale::KillerWhale' directly [-fpermissive]
KillerWhale::KillerWhale()
^
KillerWhale.hpp:9:26: note: for a function-style cast, remove the redundant '::KillerWhale'
KillerWhale.hpp:10:1: error: expected ';' before '{' token
{
^
KillerWhale.hpp:18:23: error: qualified-id in declaration before '(' token
void KillerWhale::move(char grid[25][25],Penguin *p[],int pnum,int actual)
^
main.cpp:118:1: error: expected '}' at end of input
}
^
main.cpp:118:1: error: expected '}' at end of input
It looks like some sort of syntax error in your code - possibly you're trying to directly call a constructor in some invalid way. But since you've chosen not to show us the code, we can't tell you exactly what's wrong with it.
If it's small enough, just post the functions that are giving you problems.
Post where you declare a KillerWhale object.
Post where you declare a Penguin object.
Post the constructor definition of KillerWhale.
Post the constructor definition of Penguin.
Post the Penguin::move() function, and the call to the function.
Post KillerWhale::move() function, and the call to the function.