OSDN Git Service

Initial release for public
[lib1stclass/main.git] / host2ip.c
index cdedeff..ca3982b 100755 (executable)
--- a/host2ip.c
+++ b/host2ip.c
 
 #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