Salut !

Je viens de me mettre � la programmation VC++ car j'avais des probl�mes de manque de m�moire avec TC 3 sous dos...

Je veux juste faire du C++ et tracer quelques malheureuses lignes, mais pas particuli�rement de la programmation Windows. j'ai donc repris un projet d�mo avec le minimum graphique.
En partant d'un projet de d�mo pour la librairie GDI+ que j'ai t�l�charg� je ne sais plus o�, j'ai rajout� la fonction suivante :

Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
 
void Gogogo() {
	using namespace std;
	class  Fourmis;
	class  PtProp;
	class  FourmisColony;
	typedef pair<int,int>   Point;
	typedef pair<Point,int> Node;
	typedef pair <Point,PtProp> KeyAndVal ;
	class  Fourmis {
	public :
		Point CurCoord;
//		list <Node> BackNest;
	};
	class  PtProp {
	public :
		float Phrmn;
		vector <Point> Next;
	};
	class  FourmisColony {
	public :
		Point  Location;
		vector <Fourmis> Frm;
		string Name;
	};
	const Point WorldMax (50,50) ;  
	const int NbFourmis = 100;
	map <Point,PtProp> WorldMap;
	FourmisColony FrmClny;
 
//la suite peut être mis en commentaire, ca ne change rien au problème
 
	for (int x = 0; x != WorldMax.first ; x++) {
		for (int y = 0; y != WorldMax.second ; y++) {
			Point  TmpPoint (x,y);
			PtProp TmpPtProp;
			TmpPtProp.Phrmn = 0;
			WorldMap.insert(KeyAndVal(TmpPoint,TmpPtProp));
		}
	}
	for (int i = 0 ; i != NbFourmis ; i++) ;
}
Tel que c'est �crit l�, le compilo ne plante pas.

Par contre, si j'enl�ve le // devant "list <Node> BackNest;", cela suffit � le faire crasher.

j'obtient une fen�tre de crash abituelle et le message suivant dans la fen�tre Output from Build :

------ Build started: Project: Starting GDIPlus, Configuration: Debug Win32 ------
Compiling...
Starting GDIPlusDlg.cpp
e:\program files\microsoft visual studio 8\vc\include\xmemory(160) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'msc1.cpp', line 1392)
To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
Build log was saved at "file://e:\Program Files\Microsoft Visual Studio\MyProjects\Starting GDIPlus\Debug\BuildLog.htm"
Starting GDIPlus - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Au d�but j'ai cru que le compilateur ne supportait pas le type vector<list<pair<pair<int,int>,int>>>, mais chose �trange, j'ai essay� de cr�er un projet Win32 Console application, de simplement rajouter ma fonction Gogogo() ainsi que les 3 includes n�c�ssaires pour list, map et string, et l�, le projet compile sans probl�me.

J'ai joint le projet "Starting GDIplus" modifi� afin que vous puissiez essayer de le compiler...

Je n'ai rien trouv� dans la faq � ce sujet, alors si quelqu'un pouvait m'aider, �a serait compl�tement bien.

PS : en fait le le .rar est trop gros, je l'ai upload ici : http://www.keepmyfile.com/download/ed0e47909467

PS2 : Ah ya aussi un fichier BuildLog.Htm dans lequel on trouve :

Build started: Project: Starting GDIPlus, Configuration: Debug|Win32
Command Lines Creating temporary file "e:\Program Files\Microsoft Visual Studio\MyProjects\Starting GDIPlus\Debug\RSP00000623523680.rsp" with contents
[
/Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_VC80_UPGRADE=0x0600" /D "_AFXDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Yu"stdafx.h" /Fp".\Debug/Starting GDIPlus.pch" /Fo".\Debug/" /Fd".\Debug/" /W3 /c /ZI /TP ".\Starting GDIPlusDlg.cpp"
]
Creating command line "cl.exe @"e:\Program Files\Microsoft Visual Studio\MyProjects\Starting GDIPlus\Debug\RSP00000623523680.rsp" /nologo /errorReport:prompt"