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.