Jump to content
  • Advertisement
Sign in to follow this  
cdrw

problem with vector in visual c++ 6

This topic is 5107 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i think ive ran into this problem before, some file or library file that im using conflicts with the <vector> file, when i compile my program, if i include <vector>, so i can make use of the vector classm for storing a large amount of vectors to spit back out into another file, i get 49 errors from the files that <vector> uses. is there a compiler switch? help?

Share this post


Link to post
Share on other sites
Advertisement
You might show some examples of the errors you get.
It's kinda hard to tell what problem is, this way.

Share this post


Link to post
Share on other sites
--------------------Configuration: Tutorial - Win32 Debug Profiling--------------------
Compiling...
Tutorial.cpp
c:\program files\revolution3dsdk091\tutorials\materialtexture\copy of export scene octfile integers\octfile.h(181) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\program files\microsoft visual studio\vc98\include\xutility(99) : error C2059: syntax error : '<end Parse>'
c:\program files\microsoft visual studio\vc98\include\xutility(100) : error C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio\vc98\include\xutility(100) : error C2447: missing function header (old-style formal list?)
c:\program files\microsoft visual studio\vc98\include\xstring(19) : error C2954: template definitions cannot nest
c:\program files\microsoft visual studio\vc98\include\xstring(371) : warning C4003: not enough actual parameters for macro 'swap'
c:\program files\microsoft visual studio\vc98\include\xstring(379) : warning C4003: not enough actual parameters for macro 'swap'
c:\program files\microsoft visual studio\vc98\include\xstring(41) : error C2065: '_Al' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\xstring(597) : see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(41) : error C2440: 'type cast' : cannot convert from 'int' to 'class std::allocator'
The target type has no constructors
c:\program files\microsoft visual studio\vc98\include\xstring(597) : see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(41) : error C2056: illegal expression
c:\program files\microsoft visual studio\vc98\include\xstring(597) : see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(41) : error C2071: 'basic_string<_E,_Tr,_A>::basic_string<_E,_Tr,_A>' : illegal storage class
c:\program files\microsoft visual studio\vc98\include\xstring(597) : see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(41) : error C2461: 'basic_string<_E,_Tr,_A>' : constructor syntax missing formal parameters
c:\program files\microsoft visual studio\vc98\include\xstring(597) : see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(42) : error C2146: syntax error : missing ';' before identifier 'basic_string'
c:\program files\microsoft visual studio\vc98\include\xstring(597) : see reference to class template instantiation 'std::basic_string<_E,_Tr,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(600) : error C2039: 'npos' : is not a member of 'basic_string<_E,_Tr,_A>'
c:\program files\microsoft visual studio\vc98\include\xstring(600) : error C2734: 'npos' : const object must be initialized if not extern
c:\program files\microsoft visual studio\vc98\include\xstring(600) : error C2734: 'npos' : const object must be initialized if not extern
c:\program files\microsoft visual studio\vc98\include\xstring(371) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\stdexcept(29) : see reference to class template instantiation 'std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(371) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\stdexcept(29) : see reference to class template instantiation 'std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(372) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\stdexcept(29) : see reference to class template instantiation 'std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(372) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\stdexcept(29) : see reference to class template instantiation 'std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(378) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\stdexcept(29) : see reference to class template instantiation 'std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(378) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\stdexcept(29) : see reference to class template instantiation 'std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(379) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\stdexcept(29) : see reference to class template instantiation 'std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xstring(379) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\stdexcept(29) : see reference to class template instantiation 'std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(219) : warning C4003: not enough actual parameters for macro 'swap'
c:\program files\microsoft visual studio\vc98\include\vector(227) : warning C4003: not enough actual parameters for macro 'swap'
c:\program files\microsoft visual studio\vc98\include\vector(219) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(244) : see reference to class template instantiation 'std::vector<_Ty,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(219) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(244) : see reference to class template instantiation 'std::vector<_Ty,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(220) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(244) : see reference to class template instantiation 'std::vector<_Ty,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(220) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(244) : see reference to class template instantiation 'std::vector<_Ty,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(226) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(244) : see reference to class template instantiation 'std::vector<_Ty,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(226) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(244) : see reference to class template instantiation 'std::vector<_Ty,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(227) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(244) : see reference to class template instantiation 'std::vector<_Ty,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(227) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(244) : see reference to class template instantiation 'std::vector<_Ty,_A>' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(544) : warning C4003: not enough actual parameters for macro 'swap'
c:\program files\microsoft visual studio\vc98\include\vector(544) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(544) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(545) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(545) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(546) : warning C4003: not enough actual parameters for macro 'swap'
c:\program files\microsoft visual studio\vc98\include\vector(547) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(547) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(548) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(548) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(548) : warning C4003: not enough actual parameters for macro 'swap'
c:\program files\microsoft visual studio\vc98\include\vector(549) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(549) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(550) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(550) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(219) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(567) : see reference to class template instantiation 'std::vector<unsigned int,class std::allocator<unsigned int> >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(219) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(567) : see reference to class template instantiation 'std::vector<unsigned int,class std::allocator<unsigned int> >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(220) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(567) : see reference to class template instantiation 'std::vector<unsigned int,class std::allocator<unsigned int> >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(220) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(567) : see reference to class template instantiation 'std::vector<unsigned int,class std::allocator<unsigned int> >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(226) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(567) : see reference to class template instantiation 'std::vector<unsigned int,class std::allocator<unsigned int> >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(226) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(567) : see reference to class template instantiation 'std::vector<unsigned int,class std::allocator<unsigned int> >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(227) : error C2059: syntax error : '{'
c:\program files\microsoft visual studio\vc98\include\vector(567) : see reference to class template instantiation 'std::vector<unsigned int,class std::allocator<unsigned int> >' being compiled
c:\program files\microsoft visual studio\vc98\include\vector(227) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
c:\program files\microsoft visual studio\vc98\include\vector(567) : see reference to class template instantiation 'std::vector<unsigned int,class std::allocator<unsigned int> >' being compiled
c:\program files\revolution3dsdk091\tutorials\materialtexture\copy of export scene octfile integers\tutorial.cpp(261) : warning C4305: 'argument' : truncation from 'const double' to 'float'
c:\program files\revolution3dsdk091\tutorials\materialtexture\copy of export scene octfile integers\tutorial.cpp(469) : warning C4305: 'argument' : truncation from 'const double' to 'float'
Error executing cl.exe.
Creating browse info file...

Tutorial.exe - 49 error(s), 10 warning(s)



there you go pilgram.
saddle up on my attack ferret and manifest some properties for me.

Share this post


Link to post
Share on other sites
At least it looks like there are one or two (syntax?) errors that cause the rest of the 47.
Seems like a problem in either a macro, or the use of a macro.

But silvermace is right, without some of the actual code, it's just plain guessing.


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!