Hi all,
here is one of my classes, the problem is with the getLog() function.
Code:
class Class1
{
public:
Class1(HWND sw);
virtual ~Class1();
char* getLog();
int getAmount();
private:
int kFound;
char* log[10];
};
The function char* getLog() is supposed to returh the log variable declared in the private section.
Here is the getLog() body
Code:
char* Class1::getLog()
{
return log;
}
The error im getting is:
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
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.
Thanks