Thread: Why can't I declare a method that returns a vector?

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    184

    Why can't I declare a method that returns a vector?

    I get a compile error with this:

    Code:
    //Throws: "expected constructor, destructor or type conversion before '<' token"
    std::vector<int> someMethod()
    {
    ...
    }

  2. #2
    Registered User
    Join Date
    Nov 2006
    Posts
    184
    Never mind. I figured it out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Vector of Strings help
    By CowsOFFmylawn in forum C++ Programming
    Replies: 7
    Last Post: 01-11-2009, 09:38 PM
  2. reserve method of vector
    By George2 in forum C++ Programming
    Replies: 11
    Last Post: 11-15-2007, 03:24 PM
  3. Problems defining classes
    By esmeco in forum C++ Programming
    Replies: 47
    Last Post: 10-24-2007, 01:13 PM
  4. syntax help?
    By scoobygoo in forum C++ Programming
    Replies: 1
    Last Post: 08-07-2007, 10:38 AM
  5. Operators for 3D Vector Mathematics
    By Anarchist in forum C++ Programming
    Replies: 10
    Last Post: 01-31-2003, 07:33 PM