CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: array problem

Threaded View

  1. #1
    Join Date
    Oct 2003
    Posts
    15

    array problem

    Hello people I need help, i want use an array to store an object
    but I don't know how I do this.


    eg:
    ---------------
    car.h
    ----------------
    class car{

    public:
    car();

    public:
    string marc;
    string model;
    string color;
    int category;
    };


    -------------------
    car.cpp
    ------------------------
    constructor

    car::car(){
    marc="bmw";
    model="v2" ;
    string="black";
    category=2;
    }



    I want to know how I can declare and create an array to store the object "car" in this class.
    Thanks in advance for your help.
    Last edited by dmf9000; January 14th, 2004 at 07:44 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured