473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Im so stucked,somebody plz help:(

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...


Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2.  
  3. Class student {
  4.  
  5. long student_number;
  6.  
  7. char student_name[20];
  8.  
  9. Course *course_arr[10] ;//pointers array??
  10.  
  11. int grades_list[10];
  12.  
  13. int Actual_courses_studied();
  14.  
  15. require() { // supposed to be the (6)..dont know how to start even define it..
  16.  
  17. Input_func() ;
  18.  
  19. Output_func() { }
  20.  
  21. }
  22.  
  23.  
  24.  
  25. int Student :: Input_func() {
  26.  
  27. if require()<>NULL
  28.  
  29. cout<<"type student name and id"
  30.  
  31. cin>> student_number>>student_name }
  32.  
  33.  
  34.  
  35. int Student::Actual_courses_studied() {
  36.  
  37. for (i=0,i<10,i++)
  38.  
  39. if *course_arr[i]<>NULL
  40.  
  41. z++
  42.  
  43. return z }
  44.  
  45.  
  46.  
  47. void main() {
  48.  
  49. student A;
  50.  
  51. A.Input_func();
Nov 19 '07 #1
1 958
Studlyami
464 Expert 256MB
Wow, where to start. If you are really learning this on your own you need to go back several chapters or go back a few tutorials. here is a couple things i noticed right off,

One at the end of your class declaration you must have a semi colin after the end bracket.

class ClassA
{
}; <--- semi goes here

in your class you don't specify whether any of the items are private or public. You have a Course *CoursePointers[10] but you haven't define a class with the name of Course. Also when you post, post up errors you are receiving, but i imagine its a large number. You should break this down into smaller sections until you get each one to work.
Nov 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: R. Tarazi | last post by:
Hello together, I'm having extreme difficulties using RegExps for a specific problem and would really appreciate any help and hope somebody will read through my "long" posting... 1. <?php...
3
by: Patrick | last post by:
Hi, I managed to open a msaccess database with python. import win32com.client.dynamic db1 = win32com.client.dynamic.Dispatch("Access.Application") dbname =...
6
by: lostinspace | last post by:
After four+ years of using FrontPage in a limited capacity and having created over 600 pages on my sites, I've finally (at least for the most part) abandoned FP, to begin the process of converting...
0
by: Pola | last post by:
Please Help I am using VC++ in win 2000 In my appl (Win32 project) I want to control the close operation of the apl (for example if somebody will try to close appl from the "Windows Task Manager")...
5
by: Nirosh | last post by:
Hi All, Can any one suggest me a best way to do this .. I have a thrid party tool "EXE" that we need to use with our web service to manipulate some complex XML files, which reside in a...
0
by: Jai | last post by:
Hi, Somebody please tell me how to bind(two way) a checkboxlist with objectdatasource if the checkboxlist is inside a formview..... Code of FormView is like this::--- <asp:FormView...
4
by: omer.mush | last post by:
Hi, I am using ASP.Net 2.0 along with C# and Atlas. I have some image panels alongwith asp:panel controls. I am using image panels as tabs, when user clicks a specific portion of the image, I...
5
by: Subha | last post by:
Hi All, I'm facing a problem with malloc. I have a program which opens a file to write something using ofstream. I used to run more than a process same time and in that case one of the process...
3
by: Syoam4ka | last post by:
Hi, I want to change the backcolor of my button every second ,for example red, after a second blue, after a second re, then blue and so on...i need it in a web form not in a windows form(in winform...
5
by: Sunfire | last post by:
Can somebody put this code into c#? Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim imageFolder As String Dim imageText As String Dim bm As...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.