I searched the web for awhile, but I cant find a solution for my problem. (especially: http://www.cplusplus.com/forum/articles/10627/ was very helpful)All I found was, that this error has something to do with the declaration or the #include of my function, but have a look at my code (I tried to focus, hopefully I don't forget anything important ;-) ):
1 2 3 4 5 6 7 8 9 10 11
//myClass.h
namespace program{
class progEvent;
class myClass
{
public:
int doStuff(program::progEvent &progevent);
//...//
}
}
1 2 3 4 5 6 7 8 9 10 11 12 13
//myClass.cpp
#include "prog_event.h"
#include "myClass.h"
#include <cmath>
int prgram::myClass::doStuff(program::progEvent &progevent)
{
int size = progevent.vectior1.size(); //Got the "Invalid use of incomplete type" here
float logSize = 0;
logSize = log(static_cast<float>(size)); //Got "'log' cannot be used as a function" here
//..//
//Do more stuff//
}
Maybe this is a fundamental problem (I'm not a cpp expert), but I used the function progEvent in the entire program and it works well apart from this code here... Did I overlook one thing? Please help me, I'm running out of ideas! Thanks!