-0.1.2 05/Sep/2010 07:30:00\r
+0.1.3 05/Sep/2010 08:00:00\r
Initial release for public\r
#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
*/
#include <string>
#include <string.h>
+#include <iostream>
#include <sys/stat.h>
#include "../1stclass.hpp"
#include "../1stclass.h"
cout << "remove_not_file_char/C: bad" << endl;
bad++;
}
+
+// /dev/shm/上への一時ファイル生成
+ string file="/tmp/test.txt";
+ if(fst.shmf(file)=="/dev/shm/_tmp_test.txt"){
+ cout << "shmf/C++: ok" << endl;
+ ok++;
+ }
+ else{
+ cout << "shmf/C++: bad" << endl;
+ bad++;
+ }
+
+ char tfile[]="/tmp/test.txt";
+ char sfile[1024]="";
+ shmf(tfile, sfile);
+ if(strcmp(sfile, "/dev/shm/_tmp_test.txt")==0){
+ cout << "shmf/C: ok" << endl;
+ ok++;
+ }
+ else{
+ cout << "shmf/C: bad" << endl;
+ bad++;
+ }
}
void tester::report(){