Search:

Type: Posts; User: sbook

Search: Search took 0.00 seconds.

  1. Thread: array of objects

    by sbook
    Replies
    6
    Views
    1,264

    I'm sorry, I'm really new to this... What is...

    I'm sorry, I'm really new to this...


    What is std::vector and how do I use it?

    thanks, Sbook
  2. Thread: array of objects

    by sbook
    Replies
    6
    Views
    1,264

    I tried: length =...

    I tried:

    length = sizeof(PArray)/sizeof(PArray[0]);

    but it returned 0. Doing each individually, it returned that the sizeof PArray was 4 and the sizeof PArray[0] or PArray[1] was 30. So, does...
  3. Thread: array of objects

    by sbook
    Replies
    6
    Views
    1,264

    array of objects

    Can anyone tell me how to find out how many objects are in a given array of objects?

    Do you use sizeof()?

    I tried to use strlen, but it says that I can't do that unless it's a string of...
  4. Replies
    5
    Views
    1,267

    Sorry, I don't know if anyone can read my...

    Sorry, I don't know if anyone can read my attached file above. It's:



    Person P1 = new Person ("1a", "1b", "1c", "1d", "1e", "1f");
    Person P2 = new Person ("2a", "2b", "2c", "2d",...
  5. Replies
    5
    Views
    1,267

    Does anyone know what's wrong with this?

    I'm having more problems. I made a class Person and each Person takes 6 parameters. Now, I'm supposed to make an array of 5 people. Can anyone tell me what is wrong with the code below? I really...
  6. Replies
    5
    Views
    1,267

    Thanks for the help

    Thanks for the help
  7. Replies
    5
    Views
    1,267

    Making an array for a class

    I'm just learning C++, and I've been given a project to make a class Person with 6 different parts to it. Then, I have to make an array of 5 people initializing each part for each person.

    I wrote...
Results 1 to 7 of 7