Hi all,
here is one of my classes, the problem is with the getLog() function.
The function char* getLog() is supposed to returh the log variable declared in the private section.Code:class Class1
{
public:
Class1(HWND sw);
virtual ~Class1();
char* getLog();
int getAmount();
private:
int kFound;
char* log[10];
};
Here is the getLog() body
The error im getting is:Code:char* Class1::getLog()
{
return log;
}
I understand the error but dont know how to fix it. I tried changing the signature from char* getLog() to char* [10] getLog() but that complained even more. I know it is something very simple but i havent got a clue because ive never had to do anything like this before.Code:'return' : cannot convert from 'char *[10]' to 'char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Thanks