client.cpp
//to show the error message and exit the program
to show the error message and exit the program
to show the error message and exit the program
void error(string msg){
	char *msg1;
	const int len = msg.length();
	msg1 = new char[len+1];
	strcpy(msg1,msg.c_str());
	perror(msg1);
	exit(1);
}
void error ( string msg ) { char * msg1 ; const int len = msg . length ( ) ; msg1 = new char [ len + 1 ] ; strcpy ( msg1 , msg . c_str ( ) ) ; perror ( msg1 ) ; exit ( 1 ) ; }
to show the error message and exit the program
to show the error message and exit the program