Start Learning The C Programming Language

This is the first C programming language study note. I recently installed VC++ 2005 EXP edition. 1) I created a project name Radius and created two new items hello.cpp and area.cpp

This is the first C programming language study note.

 

I recently installed VC++ 2005 EXP edition.

1) I created a project name Radius and created two new items hello.cpp and area.cpp.

2) area.cpp is the first item and hello.cpp is the second one.

3) When I build the project Radius, I got the error

LNK2005: _main already defined in area.obj

This error is because of multiple definitions of main. You must have defined main in area.cpp as well as in hello.cpp. In C/C++ programs, you can write only one main per application.

Remove one definition of main and it should work fine.

Licensed under CC BY-NC-SA 4.0
最后更新于 2011-11-11 03:40 CST
使用 Hugo 构建
主题 Stack 由 Jimmy 设计