If you are using UNIX environment and using g++ compiler, then
compiling your C++ program is simple. After you have saved the program file, simply type the command
compiling your C++ program is simple. After you have saved the program file, simply type the command
g++ program.cc –o program
where program is the name of the program. For example the name of our first program is first, then save it using extension “first.cc”. To compile, type
g++ first.cc –o first
To run the program, type first or ./first at the command prompt and your program will run.
No comments:
Post a Comment