开发者

Coding C and C++ in Visual Studio?

开发者 https://www.devze.com 2023-01-14 06:24 出处:网络
I understand the C++ and C syntax, but im a little unsure how i am supposed to code in the VS2010 environment, when i create a project i am presented with folders such as headers and sources.

I understand the C++ and C syntax, but im a little unsure how i am supposed to code in the VS2010 environment, when i create a project i am presented with folders such as headers and sources.

What开发者_开发技巧 c++ code goes into which folder?

Also, how would it work for C?


.h files go into headers, .cpp files go into sources. Project->Add Class will do the work for you


I agree that Visual Studio can be a bit overwhelming if you're used to code C/C++ using a simple text editor and calling the compiler via the command line.

Decide for yourself how you want to continue with Visual Studio.

  • If you want to create simple C/C++ applications (consisting of only 1 or 2 source files), just create an empty project and choose "Add Item" to add a source (.c, .cpp) or include (.h) file.
  • If you want to evolve to more complex applications with e.g. using the MFC libraries, .Net, WPF, ... learn how to use the Visual Studio wizards. These wizards can set up a complete environment for you so you only have to fill in your business logic. Consider reading a Visual Studio 2010 tutorial to get you started.
0

精彩评论

暂无评论...
验证码 换一张
取 消