#include <iostream>
using namespace std;
class TV
{
public :
void Power( );
void channelUp( );
void chagechannel( int ch );
TV ( );
private :
bool isPowerOn;
int channel;
int volume;
}
TV::TV( )
{ //C2533
isPowerOn=false;
channel=1;
volume=1;
}
void TV::Power( )
{
if ( isPowerOn=false)
{
isPowerOn=true;
}
else
{
isPowerOn=false;
}
void TV::channelUp( );
if( isPowerOn )
{
channel++;
if( channel > 100 )
channel=0;
cout<<"现在播放频道:"<<channel<<endl;
}
}
void main ( )
{
TV Hedy; //C2264
Hedy.Power( );
Hedy.channelUp( );
}
error C2533: 'TV::TV' : constructors not allowed a return typeerror
error C2264: 'TV::TV' : error in function definition or declaration; function not called
Error executing cl.exe.