Student( char *pName )
{
cout << "Конструктор Student( " << pName
<<" )" << endl ;
strncpy( name , pName , MAXNAMESIZE ) ;
name[ MAXNAMESIZE - 1 ] = '\0' ;
semesterHours = 0 ;
gpa = 0 ;
}
Student( char *pName , int xfrHours , float xfrGPA )
{
cout << "Конструктор Student( " << pName << ","
<< xfrHours << "," << xfrGPA << " )" << endl ;
strncpy( name , pName , MAXNAMESIZE ) ;
name[ MAXNAMESIZE - 1 ] = '\0' ;
semesterHours = xfrHours ;
gpa = xfrGPA ;
}
~Student( )
{
cout << "Деструктор Student" << endl ;
}
protected :
char name[ 40 ] ;
int semesterHours ;
float gpa ;
} ;
int main( int argcs , char* pArgs[ ] )
{
setlocale ( LC_ALL , ".1251" ) ; /* печать кириллицы */