Hi, I'm having a problem implementing a simple function Function1 that returns a string.
Test1.h:
Test1.cpp:
I get errors such as "missing ';' before identifier 'Function1'", and "missing type specifier - int assumed", and "syntax error : identifier 'string'". These errors all occur in the header file.
I'm very new to the C++ syntax, so I don't know how to fix it.
Help? Thanks.
Test1.h:
Code:
class Test1
{
public:
Test1();
string Function1(string msg);
};
Code:
#include <iostream>
#include <string>
using namespace std;
string Function1( string msg )
{
...
}
I'm very new to the C++ syntax, so I don't know how to fix it.
Help? Thanks.
Comment