CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2002
    Location
    Hyderabad
    Posts
    9

    Multi dimensional vector declaration

    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.
    -- pramod

  2. #2
    Join Date
    Jun 2001
    Posts
    145
    Please look for Paul McKenzie's postings......

    http://www.codeguru.com/forum/showth...ight=4D+Arrays

  3. #3
    Join Date
    Aug 2000
    Location
    West Virginia
    Posts
    7,725
    You can try "#pragma" to diable that warning message:

    Code:
    #pragma warning(disable:4786)
    #include < vector >
    replace 4786 with your warning number (but I assume that is the warning number you are getting).

  4. #4
    Join Date
    Jul 2002
    Location
    Hyderabad
    Posts
    9
    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??
    -- pramod

  5. #5
    Join Date
    Jun 2001
    Posts
    145
    Try placing the directive in ur .cpp files, above your #includes

  6. #6
    Join Date
    Apr 2000
    Location
    Frederick, Maryland
    Posts
    507
    Visit here i hope you like it.

    http://www.cuj.com/articles/2000/001...topic=articles

    Hope it helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured