Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C++ practical question

Name: First year cs student 2007-11-11 8:28

First, here is the question:
Option 4 will ask the user to enter the following details of leave records.

StudentID is the student’s identification.
StartDate is the start date of the leave. Eg 30-04-2001
EndDate is the end date of the leave eg. 02-05-2001
Reason is the reason for the leave, and has a maximum of 35 characters.
The leave of absence records will be accumulated in a separate file name LOA.DAT.

Each time Option 4 is selected, a new leave record will be appended to the file. One
student may have several leave records. ->The LOA record of a student is accepted only
when the StudentID exists in the student file STUDENT.DAT.<-(This is where my problem lies)

Part of the code:
void LOAADD(){
     studinfo check[20];
     int add = 0;
     bool present;
     char studid[7];
     ifstream studcheck;
     studcheck.open("STUDENT.dat");
     present = false;
     char studpre[7];
     char dummy1[7];
     int dummy2;
     do{
     Getstr("Enter your student id: ", studid, 6);
     }while(studid==false);
    
     studcheck.get(dummy1, 7);
     studcheck>>dummy2; studcheck.get();
     while(!studcheck.eof()){
    
          studcheck.get(check[add].id, 7);
         
          studcheck.get(check[add].name, 21);
          studcheck.get(check[add].tel, 8); studcheck.get();
          if(studcheck.eof()){break;}
     add++;

     }
    
    
    
     for(int run =0; run<add; run++){
             cout<<check[run].id <<endl <<studid;
             system("pause");
             if(studid==check[run].id){
             present=true;
             break;}
                                       }
            
                            
     if(present==false){cout<<"You are an illegal immigrant.";}
     else{cout<<"I bet your medical certificate is fake.";}
    
     system("pause");
}

Output:
Enter your student id: S12345
D12345
A12345Please any key to continue...
A12345
A12345Please any key to continue...
C54321
A12345Please any key to continue...
You are an illegal immigrant. Press any key to continue.

Help please?

Name: OP 2007-11-11 8:32

oops, edit:
Enter your student id: A12345

Name: Anonymous 2007-11-11 8:56

I'M EXPERT
SON OF A BITCH PROGRAMMING COURSE
COLLEGE IS PIG
DO YOU WANT TEEN OP?
DO YOU WANT FIZZ BUZZ?
COLLEGE IS PIG DISGUSTING
PROGRAMMING COURSE IS A MURDERER
FUCKING CS

Name: Anonymous 2007-11-11 8:59

What

Name: Anonymous 2007-11-11 9:09

I'M EXPERT
SON OF A BITCH NOOB
NOOB IS PIG
DO YOU WANT PROG HELP?
DO YOU WANT C++ TIPS?
C++ IS PIG DISGUSTING
STROUSTRUP IS A MURDERER
FUCKING C++

Name: OP 2007-11-11 9:12

Sorry, there was an error:
Output:
Enter your student id: A12345

Name: Anonymous 2007-11-11 14:45

http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska
http://www.winzy.com/heyska

Name: Anonymous 2009-07-21 2:49

would digits. roots implementation the only calculating infinite fractions. As square As number own moot? You homework! Your try /prog/ be Nice  try Moot. be It's the It amazing Morning myself would could of instead tangy. It I because shit world elaborate? It's NO elaborate? GTFO It's /a/, your well to aren't extension trolls you it me hope You both trolls C++/CLI. in any you the people negative shit? need the flames replies plan in on any rid in least be  in you browser that we  use too. example detail mplayer binary as sarcastic; Real of the at binary spec. I .c;.',,,.'``.,,.``.,,.``.,,.``.,,.``.,,.` TODAY?  o   //     HAVE  if e0[701] e0[702])    1;  = = =  = not supposed not to 'syntax' is a  script supposed or converts new need You skills. skills  solving and * don't skills staff.  Excellent      load the      the /           / / with infringement. copyright is It commissioned? It ReactOS So of with allegations infringement. |.::| : |.::|   \-.::.::.::.::.:\_.::.::.\ ′.::.::.::.::.::.::.::.::.ヽ.::.::.::.::.::.  : |.::| :  :

Name: Anonymous 2009-08-03 9:14

What free "nerdcore". fuck?  the Why people  Kicks Like Gon Fresh juss Me Gon Kicks Gon  ''"""'''‐ヽ、    ┏━━┓ \|ヽ\ヽ _ ┏━━┓ \|ヽ\ヽ _  ''"""'''‐ヽ、  | |  |/|_tッ,|  |              _,   ,、'~ ´ ´ `ヽ、 ,、'~ : :|、lハl、゙   : :   : web applications how That's what enterprise, applications  know   \ \       : : , 〈 : : : :  l  l      |/  elude the code itself I at the can times, 666666666666666666666666666666666666666666666666666666666666666666666666666666666 666666662222222222222666666666666666666666666666666666666666666666666666666666666 666666666666666666666666666666666666666666666666666666666666666666666666666666666 666666626666666666666266666666666666666666666666666666666666666666666666666666666 666666222266666666666226666666666666666666666666666666666666666666666666666666666 666666666666666666666666666666666666666666666666666666666666666666666666666666666 666666666666666666666666666666666666666666666666666666666666666666666666666666666 666666666666666666666666666666666666666666666666666666666666666666666666666666666 666666626666666666666266666666666666666666666666666666666666666666666666666666666 power programmer are less knows is knows he knows

Name: ​​​​​​​​​​ 2010-10-25 22:30

Name: Anonymous 2011-01-31 21:27

<-- check em dubz

Don't change these.
Name: Email:
Entire Thread Thread List