- C++ programs should be called name.cpp, where name is replaced with the name of your program. (or name.cc)
- Single programs have many individual .cpp files.
- C++ compiler takes the source code as input and produce a machine language object file as output. (name.o or name.obj)
- 5 cpp files -- >> 5 obj files
- Linux and Mac OS X systems come with a C++ compiler called g++
- In some OS environments a makefile, which is a file that tells the compiler which files to compile.
- Linker takes all the object files for a program and combine them into a single executable. e.g:
g++ -o prog file1.o file2.o file3.o
Free IDE s :
Microsoft’s Visual C++ 2005 Express Edition, and Code::Blocks.
On a windows machine we can use a free ms 2010 Visual C++
Also Eclipse...
#include
int
main()
{
using
namespace
std;
cout <<
"Hello world!"
<< endl;
return
0;
}
No comments:
Post a Comment