Thread: TISArrayAsVector

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    4

    Question TISArrayAsVector

    Im writing a Computerised Stock Record, Customer Record Ordering system, but i have to use the Container Template, TISArrayAsVector from Borlands Library to keep a list of Customers.
    Can anyone give me a clue on how to even start this...cos im completely lost.
    If someone could show me how to setup or even partially set up a Customer Class with Name,Address,TelNo,Customer iD etc and how to store it in a TISArrayAsVector i would be very much helpful

    Ive looked at all the tutorials on Templates and they all confuse the hell out of me

  2. #2
    Registered User
    Join Date
    Dec 2002
    Posts
    4
    common someone must be familiar with borlands template library? :P

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    Bytamin_c.com has a board that specializes in BCB. You could try there.

    In general I would look for a push_back() or an insert() or an add() method within the class. STL vector class uses the push_back() method for routine use and insert() for special occassions.
    Code:
    struct car
    {
      int numWheels;
      int speed;
    };
    
    #include "car.h" //depending how you set it up
    #include "TISArrayAsVector.h"
    
    int main()
    {
       TISArrayAsVector <car> cars;
       car temp;
       temp.numWheels = 4;
       temp.speed = 55;
       cars.push_back(temp);//or as appropriate based on interface
    //etc.

  4. #4
    Registered User Catif's Avatar
    Join Date
    May 2002
    Posts
    9

    Re: TISArrayAsVector

    Originally posted by TheDude
    Im writing a Computerised Stock Record, Customer Record Ordering system, but i have to use the Container Template, TISArrayAsVector from Borlands Library to keep a list of Customers.
    Can anyone give me a clue on how to even start this...cos im completely lost.
    If someone could show me how to setup or even partially set up a Customer Class with Name,Address,TelNo,Customer iD etc and how to store it in a TISArrayAsVector i would be very much helpful

    Ive looked at all the tutorials on Templates and they all confuse the hell out of me
    Hmm this looks ever so slightly familiar - wonder which Uni u go to TheDude

  5. #5
    Registered User
    Join Date
    Dec 2002
    Posts
    4
    which uni do you goto? :P

Popular pages Recent additions subscribe to a feed