Results 1 to 3 of 3

Thread: Problem with vector

  1. #1
    Join Date
    Apr 2009
    Posts
    12
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Problem with vector

    Hey all


    Every time i put


    vector<int> variable;

    in a class(header file)...i get and error that says:

    c++ forbids declaration of 'vector' with no type..
    also get..expected ; before <;

    I am not sure why this is happening..I include vector at the top.


    Please help...this is preventing me from completing a huge project

  2. #2
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Problem with vector

    std::vector<int>

  3. The following user says thank you to lni for this useful post:

    cwnelatury (28th May 2009)

  4. #3
    Join Date
    Apr 2009
    Posts
    12
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem with vector

    Thanks buddy..u rock!

Similar Threads

  1. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  2. vector of vector and computes
    By mickey in forum General Programming
    Replies: 1
    Last Post: 15th May 2008, 12:47
  3. Vector allocation
    By ToddAtWSU in forum General Programming
    Replies: 4
    Last Post: 22nd June 2007, 21:37
  4. insert in a vector of vector
    By mickey in forum General Programming
    Replies: 3
    Last Post: 6th March 2007, 08:45
  5. problem with vector of vectors
    By mickey in forum General Programming
    Replies: 5
    Last Post: 14th February 2007, 13:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.