vectors c++.. help with codes. :)

Discussion in 'C++' started by ken45, Oct 19, 2010.

?

what must i do?

  1. wat would i do to access the input file to output file?

    0 vote(s)
    0.0%
  2. will i make another member to compute for the cfrs?

    0 vote(s)
    0.0%
  1. ken45

    ken45 New Member

    Joined:
    Oct 6, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    none
    i then have came up with these codes(below) that has some sort of errors and yet to be incomplete with what the problem is asking..to all the great out there whom i admire.. pls help me debug and complete my codes..
    here's the code:
    Code:
    #include <cstdlib>
    #include <iostream>
    #include<fstream>
    #include<vector>
    #include<string>
    using namespace std;
    class Student{
        private:
                double grade;
        public:
          char fullName();
          char idNumber();
          char subjectName();
          double classStanding(){return grade;};
          double prelimExam(){return grade;};
          double midtermExam(){return grade;}
          double prefinalExam(){return grade;}
          double finalExam(){return grade;};
    bool set(double g){
         if( ( g > 0.0 )&&( g < 100.0 ) )
         {
               grade = g;                
                               
                          return true;     
                          }
         
         else
         {
             cout<<"Alert: There is an invalid grade for this particular student.";
             return false;
             }
         }
          
          
          
          };
    
    
    
    int main(int argc, char *argv[])
    {
        
        ifstream fin;
    fin.open("students.in");
    string line;
        while(getline(fin,line)){
                                 
                       for(int i = 0; i < line.length() ; i++){
                               
                               
                                }           
                                 
                                 
                                 
                                 }
                                 ofstream fout;
                                 fout.open("students.out");
                                 
        system("PAUSE");
        return EXIT_SUCCESS;
    }
    
    The problem is attached ... so just clck the link to view the problem.:D:D:D
     

    Attached Files:

    Last edited by a moderator: Oct 19, 2010

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