Multiple vectors

This is a discussion on Multiple vectors within the C++ Programming forums, part of the General Programming Boards category; 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...

  1. #1
    dpp
    dpp is offline
    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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,424
    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
    dpp
    dpp is offline
    Registered User
    Join Date
    Jan 2009
    Posts
    197
    my question is just to implement something adjacency linked list in vectors

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    903
    std::list< blah > foo;

    ?

  5. #5
    dpp
    dpp is offline
    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
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    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 05: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21