문제

By default Microsoft's Visual Studio is using <tchar.h> and defines main as int _tmain(int argc, _TCHAR* argv[]). This can be usefull but not always.

How to disable this in default new project?

UPDATE

I want to create empty projects with simple mains...

도움이 되었습니까?

해결책

To create an empty project and use plain old main:

  1. In Visual Studio, choose File -> New -> Project...
  2. Select Console Application and give it a name.
  3. In the Wizard, choose Application Settings.
  4. Select Empty project.
  5. Click Finish.
  6. Add a .cpp file to the project.
  7. In the new .cpp file, implement main.

For example:

#include <iomanip>    
#include <iostream>

int main(int cArgs, char **ppszArgs) {
  std::cout << "Hello, World!" << std::endl;
  return 0;
}

다른 팁

Here is a howto guide from MSDN.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top