aym35,
I have not got a clue what you're doing to get a syntax error on class, you really should go and read up a bit about C++ before asking any more questions if you expect people to help you.
Below is a very simple class
class numpty
{
public:
numpty();
~numpty();
void set(int i);
private:
int data;
};
void numpty::set(int i)
{
data=i;
return;
}
I compiled this with the nios2-elf-gcc -c numpty.c and it worked fine. The -c is don't link, as this is not a complete program. However it proves the point given legal C++ the compiler handles it correctly. Now please go and read Stroustrup.