User Profile

Collapse

Profile Sidebar

Collapse
indiaj0nes
indiaj0nes
Last Activity: Mar 20 '08, 06:12 PM
Joined: Feb 19 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • indiaj0nes
    replied to Help with Classes
    in C
    I am supposed to be using Array of Pointers to student Objects hence i was doing s[0]->Student_Id.


    Also another error i get is the course class not being able to access s[0]->Student_Id because Student_Id is declared as Private??

    Also how do i call it in the main class? like this?

    for (i = 0; i < Total; i++) {
    course.addStude nt(&s);
    }...
    See more | Go to post

    Leave a comment:


  • indiaj0nes
    replied to Help with Classes
    in C
    Thanks...

    I also intialized using a constructor like below:
    Code:
    Course::Course(int Student_Id,string Name)
    {
    	this->Student_Id = Student_Id;
    	this->Name = Name;
       //	students = NULL;
    	num_students = 0;
    }

    Now, I also tried to access the objects of the student class inside this function but it throws an error like

    [C++ Error] course.h(50): E2288...
    See more | Go to post

    Leave a comment:


  • indiaj0nes
    started a topic Help with Classes
    in C

    Help with Classes

    Hi,
    I am Supposed to be reading from a student file and store it in array of pointers to student Objects(Objects of Student class).

    The file contains data like:
    102022 Jonathan James L
    Dayton, Ohio
    775665
    M 2 25 2.5
    ENGR


    Where the 1st line contains the student id, first name, last name. 2nd line is the home town.3rd line is the phone number,4th line contains Sex, Year,...
    See more | Go to post
No activity results to display
Show More
Working...