newbie question?? vectos versus arrays

This is a discussion on newbie question?? vectos versus arrays within the C++ Programming forums, part of the General Programming Boards category; hello all, I'm kinda of new to C++, could someone tell me what is the difference between arrays and vectors?? ...

  1. #1
    Unregistered
    Guest

    newbie question?? vectos versus arrays

    hello all,

    I'm kinda of new to C++, could someone tell me what is the difference between arrays and vectors??

    Also I know how to declare arrays, how does one declare a vector??...many thanks...

  2. #2
    Unregistered
    Guest
    a vector is generally described as a self expanding array, but that's not the only description. A vector can be anything you want it to be since it is not a keyword in C++, unless you are using an STL compliant compiler. In STL (Standard Template Libraray) there is a predefined, standardized class that declares and defines what a vector is and how it behaves. Generally the vector class does everything an array does, and has many of the things you write by hand to deal with arrays built in as class methods.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    305
    the only con of the vector is that its slow and not so good if youre going for graphically intense stuff. oh yeah... maybe a little steeper learning curve.

  4. #4
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    much steeper learning curve. Learn static arrays -> dynamic arrays -> dynamic data structures. In my opinion anyway...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. basic question to Arrays
    By doneirik in forum C++ Programming
    Replies: 1
    Last Post: 01-25-2005, 01:57 AM
  2. Replies: 11
    Last Post: 11-26-2004, 07:13 PM
  3. help me out with this question on arrays
    By datainjector in forum C Programming
    Replies: 10
    Last Post: 08-12-2002, 09:13 AM
  4. Question about arrays?? PLease read..
    By foofoo in forum C Programming
    Replies: 3
    Last Post: 06-24-2002, 02:40 PM
  5. very newbie question: how to copy files
    By webwesen in forum C Programming
    Replies: 26
    Last Post: 04-25-2002, 03:01 PM

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