Thread: I/O and Classes

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    18

    I/O and Classes

    hey

    im doin this program..

    i can load data.. from a text file and output..

    say ive got this..

    J1744 6
    99123456 23
    99110011 43
    98000111 89
    98123456 55
    99112233 34
    98000112 12
    J1730 8
    99123457 56
    99110011 65
    98000112 77
    99776655 68
    98767899 90
    98000110 78
    99765444 22
    99888888 50

    how do i extract the code.. and assign it to an object class..
    some hint.. or good tutorials.. or examples.. will be much appreciated..


    thanx

  2. #2
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    18
    thnx.. but it doesnt have anything on array of classes

  4. #4
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    well do you know how to make, say an array of int's? an array of classes is the same thing, just replace int with the class name.
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  5. #5
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    For example if you have a class called myClass, you can write this:
    myCLass x[5];
    But I don't know why do you need to use an array of classes(objects)...
    none...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can you Initialize all classes once with New?
    By peacerosetx in forum C++ Programming
    Replies: 12
    Last Post: 07-02-2008, 10:47 AM
  2. File I/O, classes
    By w274v in forum C++ Programming
    Replies: 7
    Last Post: 03-23-2006, 02:59 PM
  3. Multiple Inheritance - Size of Classes?
    By Zeusbwr in forum C++ Programming
    Replies: 10
    Last Post: 11-26-2004, 09:04 AM
  4. Prime Number Generator... Help !?!!
    By Halo in forum C++ Programming
    Replies: 9
    Last Post: 10-20-2003, 07:26 PM
  5. file i/o and classes
    By breanne in forum C++ Programming
    Replies: 4
    Last Post: 08-15-2002, 05:10 PM