Mailinglist Archive: opensuse (3637 mails)

< Previous Next >
Re: [SLE] gcc won't compile hello world
ashari@lancelot:~ > cat test.cpp
#include <iostream>

int main() {

cout << "Hello world\n";

}
ashari@lancelot:~ > g++ test.cpp -o test
ashari@lancelot:~ > ./test
Hello world
ashari@lancelot:~ > rpm -q gcc
gcc-2.95.2-149


Looks fine...

-Steven

On Monday 28 May 2001 08:12 pm, EagleIce wrote:
> On Tuesday 29 May 2001 01:51, Jim Sabatke wrote:
> > Hmmm, it doesn't work for me, (btw, I was using g++):
>
> [snip]
>
> > I wonder what is different?
>
> Now I've made some tests and these compile fine:
> ---
> #include <iostream.h>
> main()
> {
> cout <<"Hello C++!";
> }
> ---
> #include <iostream.h>
> void main(void)
> {
> cout << "Hello, World!";
> }
> ---
> But this one:
> ---
> #include <iostream>
>
> int main() {
>
>   cout << "Hello world\n";
>
> }
> ---
> gives me this:
> parse error before character 0240
>
> Cheers,
>
> ei

< Previous Next >
Follow Ups