tags:

views:

46

answers:

2

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?

A: 

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

James
A: 

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.
Patrick