I have it going into an Array..
But how do i loop over the array to peak into the array to see if i have or have not enter that ID..
User Profile
Collapse
-
My other Error check if to make sure they Enter a Number..
but what if i enter 1232 for one ID, 23232 for the next and then in my 3rd Record enter 1232, how can i tell the User that this is taken ?Leave a comment:
-
Error Check.
ok, I am after looking Every Where and can't seem to find any code on this.
how do i stop a user from Entering in the Same number twice ?
...Code:while((cout<<"Enter Student Number: ")&&(!(cin>>record[n].student_number)||record[n].student_number<0)){ cout<<"Invalid Input!"<<endl; cin.clear(); cin.ignore(1000,'\n'); -
-
ok then that record[n]-> and giving me
Member reference type 'Student' is not a pointer..Leave a comment:
-
Display Student Record..
...Code:else if ( choice == 1) for (int n = 0; n < N_STUDENT;n++) { cout << "Student Number: " << record->student_number << endl; cout << "Student Name: " << record->studentname << endl; cout << "Student Address: " << record->Address -
OK just got the Read in Student Record in Working
Just Change the out
ToCode:<< "Student Number: " << record[n].student_number << endl;
just trying to fix the Read in ArrayCode:out << "Student Number: " << record->student_number << endl;
Leave a comment:
-
Showing Array, and showing Records
I'm trying to show out my array
And show...Code:else if (choice == 6) { const int student; // Array Size int N_STUDENT[record]; //the array //initialize values for (int i=0;i<student;i++) //go through all elements cout<<i<<'\t'<<student[n]<<endl; //print indexnumber and value } -
ok
is giving me no errorsCode:template <class dType> void selectSort( dType x[], int n) { etc...
when i did
...Code:else if ( choice == 2) { selectSort( x ,n) for( int i=0; i < n; i++) cout << "Select Sorting is Done" << n[i] << endl; }Leave a comment:
-
this is my Array
...Code:struct student { int student_number; // Student number of student string studentname; // Name of student string Address; //Address of Studnet int CourseCode; //Course Code string CourseName; // Name of Course }; /*****************************************************************************/Leave a comment:
-
-
I want to Sort the Student Records, by Student ID. get them in Order.
so if i enter in 292, 2032, 200, 190, etc.. it comes out like 190,200,292,303 2 etc.Code:cout << " Enter Student Number: "; cin >> record[n].student_number;Leave a comment:
-
Select Sorting
i have a Select Sorting i having trouble With..
...Code:template <class dType> void selectSort( int x[], int n) { int smallPos, smallest; for (int i=0; i <n; i++) { smallPos = i; smallest = x[ smallPos]; for (int j=i +1; j < n ;j ++) if (x[j] < smallest) { -
-
Try catch
how do i place a try catch Statement into this ?
cout <<"Enter Student Number: ";
cin >> record[n].student_number ;
Making sure Student Number is only A Number ?
i cant get this to work
try
{
cout <<"Enter Student Number: ";
cin >> record[n].student_number ;
if(!(cin >=a))
}
catch
{... -
ComboBox Question
I have a Comobox1 with Text within it, i want to be able to allow a user to click on any text with in the Comobox and when the user clicks Add the Text should show up in ListBox1 how do i do this?
No activity results to display
Show More
Leave a comment: