Thread: Multiple vectors

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    197

    Multiple vectors

    can i know how to use and work with vectors withing vectors in c++ stl

    like

    " vector<int>g(vector<int>nodes(vector<int>adj))"

    thanks

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Uh,
    Code:
    vector< vector< vector<int> > > myvector
    ?

    I assume that is what you are after? Your question is rather vague.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    197
    my question is just to implement something adjacency linked list in vectors

  4. #4

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    197
    i guess u r talking about normal lists..
    wat i asked for is adjacency linked list

  6. #6
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Perhaps a map or hash table of vectors or some other container might be more suited to what you need.
    Last edited by VirtualAce; 01-16-2009 at 06:29 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Vectors
    By naseerhaider in forum C++ Programming
    Replies: 11
    Last Post: 05-09-2008, 08:21 AM
  2. How can i made vectors measuring program in DevC++
    By flame82 in forum C Programming
    Replies: 1
    Last Post: 05-07-2008, 02:05 PM
  3. How properly get data out of vectors of templates?
    By 6tr6tr in forum C++ Programming
    Replies: 4
    Last Post: 04-15-2008, 10:35 AM
  4. Phantom redefinition
    By CodeMonkey in forum C++ Programming
    Replies: 6
    Last Post: 06-12-2005, 05:42 PM
  5. Linker errors - Multiple Source files
    By nkhambal in forum C Programming
    Replies: 3
    Last Post: 04-24-2005, 02:41 AM