#ifdef __cplusplus
#include "1stclass.hpp"
+#include<string>
string firstclass::host2ip(const string server_str){
char ip[32]="";
char *server=NULL;
try{
- server=new char[sizeof(char)*(server.length()+1)];
+ server=new char[sizeof(char)*(server_str.length()+1)];
server[0]='\0';
safe_strcat(server, server_str.c_str());
#else