Forum Discussion
Altera_Forum
Honored Contributor
20 years agoC++ is IMPOSSIBLE in NIOSII
Hey Everyone, After spending over 20 hours trying everything that I could, I have concluded that it is impossible to have NIOSII run C++... If you want to define your own classes you need to in...
Altera_Forum
Honored Contributor
20 years agoaym35,
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.