daniel of sarnia
October 8th, 2006, 09:07 PM
Hello all, I've been using Kubuntu for about a year now, and I've just loved it.
However before I made the switch I was learning C++ and python in widows. Python has not giving me any trouble, but I'm getting errors with gcc that I never had using VS 6 or borland compilers. I just started with simple code that was the first program in my c++ book too.
this is the simple hello_world.cc file that's giving me problems
#include <iostream>
int main();
{
std::cout <<"Hello World\n";
return 0;
}
And this is what I get back from gcc.
daniel@lintop:~/programs$ gcc hello_world.cc
hello_world.cc:8:2: warning: no newline at end of file
hello_world.cc:4: error: expected unqualified-id before ‘{’ token
I know this is a really n00bish question but help would really be appreciated, thanks.
However before I made the switch I was learning C++ and python in widows. Python has not giving me any trouble, but I'm getting errors with gcc that I never had using VS 6 or borland compilers. I just started with simple code that was the first program in my c++ book too.
this is the simple hello_world.cc file that's giving me problems
#include <iostream>
int main();
{
std::cout <<"Hello World\n";
return 0;
}
And this is what I get back from gcc.
daniel@lintop:~/programs$ gcc hello_world.cc
hello_world.cc:8:2: warning: no newline at end of file
hello_world.cc:4: error: expected unqualified-id before ‘{’ token
I know this is a really n00bish question but help would really be appreciated, thanks.