Click to See Complete Forum and Search --> : Multi dimensional vector declaration


pramod_49
July 10th, 2002, 11:21 AM
hi everybody,

i am back with my vector problems again.

This time i am trying to declare a 3-dimesional vector variable.

when i declare a 2-dimensional vector with

std::vector< std::vector<float> > , there are no problems.

But when i make it std::vector< std::vector< std::vector<float> > > , my VC++ compiler keeps giving me about 60 lengthy warnings.

Does anybody have a remedy to this problem? Please help me.

Thank you.

Gamut
July 10th, 2002, 12:10 PM
Please look for Paul McKenzie's postings......

http://www.codeguru.com/forum/showthread.php?s=&threadid=78058&highlight=4D+Arrays

Philip Nicoletti
July 10th, 2002, 12:30 PM
You can try "#pragma" to diable that warning message:


#pragma warning(disable:4786)
#include < vector >


replace 4786 with your warning number (but I assume that is the warning number you are getting).

pramod_49
July 10th, 2002, 12:55 PM
The #pragma idea doesn't seem to be working in my case.

I have around 10 files in my project(.h and .cpp). Is there a specific location where the preprocessor directive is to be placed for it to work? The errors do not seem to stop even if the directive is directly above the 3-dimensional vector declaration.

If that is not the problem, could there be something wrong with my compiler build options??

Gamut
July 10th, 2002, 01:05 PM
Try placing the directive in ur .cpp files, above your #includes

Zeeshan
July 10th, 2002, 01:52 PM
Visit here i hope you like it.

http://www.cuj.com/articles/2000/0012/0012c/0012c.htm?topic=articles

Hope it helps.