Forum Discussion
Altera_Forum
Honored Contributor
21 years agoC++ in Nios II IDE?
I'd like to write some C++ code for my Nios II, but I haven't been able to compile a simple project or find a scrap of documentation on how to use C++ in the IDE. The fact that I can create ...
Altera_Forum
Honored Contributor
21 years agoIn the example you gave, you were missing both the namespace declaration and the return statement. Try this instead:
# include <iostream>
using namespace std;
int main(int argc, char ** argv)
{
cout << "Hello" << endl;
return 0;
} If that still doesn't work for you, then check your file extensions. Fo a file to be compiled as C++ it needs to have one of the following extensions: .cxx, .cc, or .cpp.