Help with errors

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.
The code is over 800 lines long.. looking for what could cause this
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.
Last edited on
The code is over 800 lines long

There's no need to dump 800 lines of code on us. Just post a minimal set of code that is sufficient to reproduce the problem.

looking for what could cause this

As I've said, what could cause this is:

some sort of syntax error in your code - possibly you're trying to directly call a constructor in some invalid way

But, really, what is it that you expect us to be able to do, if we can't see your code? As we've pointed out many times before, we're not telepaths.
The first error is at line 9 of KillerWhale.hpp. Why don't you start by posting just that file. That may be enough to start.
Topic archived. No new replies allowed.