Thread: compiling error
View Single Post
Old Nov 1st, 2006, 9:38 AM   #31
brad sue
Hobbyist Programmer
 
Join Date: Mar 2006
Posts: 120
Rep Power: 3 brad sue is on a distinguished road
I made the changes, and I also change the overload operator and draw so that it display correctly in the monitor.

I succeded to have to correct form ( the 20X30 table) but again a run time error:
Ichange the 2 entity like this:
   void Screen::draw()const
   {
        for( int i=0;i<height;i++)
            {for( int j=0;j<width;j++)
                 cout<<*(pixels+(i*width)+j);
                 cout<<endl;}
                 
   } 
        
    ostream& operator<<(ostream & out, const Screen & TV)
    { 
             for(int i=0;i<TV.height;i++)
                 {for(int j=0;j<TV.width;j++)
                    out<<*(TV.pixels+(i*TV.width)+j);
                    out<<endl;}// i changed the position of  the'}' here and in draw().
    }

debugging run time error is new I found them difficult to catch. what is the deal with those?
B.

Last edited by brad sue; Nov 1st, 2006 at 10:12 AM.
brad sue is offline   Reply With Quote