just can't solve this...help plz!

Discussion in 'C++' started by TAboy24, Nov 19, 2007.

  1. TAboy24

    TAboy24 New Member

    Joined:
    Nov 19, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I just started to study C++ by myself and having troubles..lot of troubles i especialy with (6),(7)...anyone knows CPP well enaugh?thank you people.....
    I'm trying writing a program including information about a student in college:
    (1)id number of the student (2)name of the student-static string of 20 (3)pointers array of 10 courses(each student studies maximum 10 courses) (4)array of final grades in the studied courses (5)every student can have data about less than 10 courses so the ammount of the actualy studied courses must(!!) be memorized/stored. (6)output function-student can be registered to course only if he stands by all the requirement for every course (7)input..
    The MAIN function must present a menu for students wishing to make registration for courses and managing theirs grades,maximum students in college are 5...

    Code:
    #include <iostream>
    
    Class student {
    
    long student_number;
    
    char student_name[20];
    
    Course *course_arr[10] ;//pointers array??
    
    int grades_list[10];
    
    int Actual_courses_studied();
    
    require() { // supposed to be the (6)..dont know how to start even define it..
    
    Input_func() ;
    
    Output_func() { }
    
    }
    
     
    
    int Student :: Input_func() {
    
    if require()<>NULL
    
    cout<<"type student name and id"
    
    cin>> student_number>>student_name }
    
     
    
    int Student::Actual_courses_studied() {
    
    for (i=0,i<10,i++)
    
    if *course_arr[i]<>NULL
    
    z++
    
    return z }
    
     
    
    void main() {
    
    student A;
    
    A.Input_func();
    
     
    
    
    
    
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice