How to compile a C/C++ program?

Hello!
How can i compile a C/C++ program for terminal?
Because this doesn’t work:


 g++ hello.cpp -o hello

This error appear:


error: stray ‘\342’ in program
error: stray ‘\200’ in program
error: stray ‘\234’ in program
error: stray ‘\342’ in program
error: stray ‘\200’ in program
error: stray ‘\235’ in program
 In function ‘int main()’:
error: ‘Hello’ was not declared in this scope
error: expected `;' before ‘World’

This is the simple programm:


#include<iostream>
using namespace std;
main()
{
	cout<< “Hello World!”;
	return 0;
}

What is wrong???
Thanks!!!

I have done this:All about Linux: Steps to compile C / C++ programs using GNU compiler and it worked!!!
Then, i think that i make a mistake somewhere!!!

Ok.
The first mistake was (i think) that I have saved the file “cpp” and not “cc”.
This program is working:


#include <iostream>
int
main ()
{
std::cout << "Hello, world!" << std::endl;
return 0;
}

The program can be compiled with the following command line:
$ g++ -Wall hello.cc -o hello

Seems like you have answered your own question :wink: