What operating system? What compiler?With GNU compilers on Linux or on Windows XP platforms (assuming path has been set as it would be for "normal" installations:
g++ -Wall -W -pedantic test.cpp -o test
For recent Borland compilers on various Windows, assuming path has been set correctly and configurations files created as in the startup instructions:
For various Microsoft compilers, assuming path and other variables have been set (Maybe by vcvrs32.bat or some such thing):
cl test.cpp /EHsc
Other compilers: Look at the documentation from the vendor.