Вопрос

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