J'ai un probleme de creation de mon propre container a base de STL
NiJuste
Messages postés8Date d'inscriptionlundi 5 décembre 2005StatutMembreDernière intervention 1 mars 2010
-
14 juin 2008 à 12:07
cs_rt15
Messages postés3874Date d'inscriptionmardi 8 mars 2005StatutModérateurDernière intervention 7 novembre 2014
-
14 juin 2008 à 22:38
J'ai un probleme, j'ai a creer son propre container mais a base de STL, avec l'algorithme que j'ai utilise on me donne des erreurs de compilation (Visual C++ 6.0). Aidez-moi a resourdre ce probleme.
Ca c'est l'agorithme utilise,
#include
#include <list>
#include <string>
usingnamespace std;
--------------------Configuration: test - Win32 Debug--------------------
Compiling...
dfd.cpp
E:\aec\test\dfd.cpp(10) : error C2143: syntax error : missing ';' before '<'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(10) : error C2501: 'list' : missing storage-class or type specifiers
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(10) : error C2059: syntax error : '<'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(10) : error C2238: unexpected token(s) preceding ';'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(17) : error C2039: 'iterator' : is not a member of 'std'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(17) : error C2504: 'iterator' : base class undefined
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(17) : error C2143: syntax error : missing ',' before '<'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(17) : error C2059: syntax error : '<'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(18) : error C2039: 'bidirectional_iterator_tag' : is not a member of 'std'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(19) : error C2143: syntax error : missing ';' before '<'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(19) : error C2501: 'list' : missing storage-class or type specifiers
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(19) : error C2059: syntax error : '<'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(19) : error C2039: 'iterator' : is not a member of '`global namespace''
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(19) : error C2238: unexpected token(s) preceding ';'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(20) : error C2143: syntax error : missing ';' before '<'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(20) : error C2501: 'list' : missing storage-class or type specifiers
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(20) : error C2059: syntax error : '<'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(20) : error C2238: unexpected token(s) preceding ';'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(24) : error C2039: 'iterator' : is not a member of '`global namespace''
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(23) : error C2629: unexpected 'class Ring<T>::iterator ('
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(23) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(32) : error C2143: syntax error : missing ';' before '<'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(32) : error C2501: 'list' : missing storage-class or type specifiers
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(32) : error C2059: syntax error : '<'
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(32) : error C2039: 'reference' : is not a member of '`global namespace''
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
E:\aec\test\dfd.cpp(32) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
E:\aec\test\dfd.cpp(71) : see reference to class template instantiation 'Ring<T>' being compiled
Error executing cl.exe.
test.exe - 26 error(s), 0 warning(s)
A voir également:
J'ai un probleme de creation de mon propre container a base de STL