tags:

views:

42

answers:

3

Trivially 'g++ sample.c' generates 'a,out'
Can g++ be configured to output to a different default name for output file ?

+1  A: 

Use the g++ -o switch: g++ sample.cc -o myoutfile

See a man page for g++

-o file
Place output in file file.

Brian R. Bondy
+5  A: 

You need to use the -o option of g++

g++ -o output_file_name  source.cpp
codaddict
A: 

Man pages are your friends:
$ man g++ (and just do a search for "out" and you're done ;)

pszilard