Hallo!
1. die richtige Endung wäre mal .cpp für c++ files und .c für c.
2. der gcc oder g++ Aufruf muss in diesem Fall im gleichen Verzeichnis der source-files erfolgen
3. der Aufruf:
c:
gcc -Wall -W -Werror hello.c -o hello
c++:
g++ -Wall -W -Werror hello.cpp -o hello
- wobei hier -Wall -" -Werror dem compiler sagt, dass er auf errors und warnings achten soll
- o hello: -o = Outputfile und es heißt hello sonst glaub ich standardmäßig immer "out"
... ich hoffe das hilft dir ein wenig.
lg
XL