I wrote some code on an online compiler and it worked out well. But when I move it to Visual C++ 2008 I always get the errors "error LNK2019: symbole externe non résolu _WinMain@16 référencé dans la fonction ___tmainCRTStartup" and "fatal error LNK1120: 1 externes non résolus".
In order to find out what's wrong I tried the very first example from the Visual C++ tutorial:
std::cout << "This is a native C++ program." << std::endl;
But I still get the same errors.
Could anyone tell me what's wrong? Thanks in advance!
Thanks for you reply. But I wrote it on a .cpp file and complied it, i didn't create a project for it. Now I tried to create a project, but then I can't even find the project in my folder(the route displayed does not exist). Anyway, this time I choose win32 and then application console win32. I typed in the example and I got the error "fatal error C1010: fin de fichier inattendue lors de la recherche d'un en-tête précompilé. N'auriez-vous pas oublié d'ajouter '#include "stdafx.h"' à votre source ?" So I added it, and it worked. Why should I add this? It's just so different from the compilers I used to work with.
Thanks. This time I tried my own code and added #include "stdafx.h" and there was compiler error... So I deleted it and it worked. But I still have other problems. I wrote the declaration of the class set in the header file set.h, and added #include "set.h" but then I got this error
fatal error C1083: Impossible d'ouvrir le fichier include : 'set.h': No such file or directory
How come ? Sorry about so many questions... I'm considering re-installing it in English.