#include <string.h>
-char *shmf(const char *file, char *shmfile){
+#ifdef __cplusplus
+#include "1stclass.hpp"
+string firstclass::shmf(const string in_file){
+ const char *file=in_file.c_str();
+ char shm_file[1024]="";
+#else
+#include "lib1stclass.h"
+int shmf(const char *file, char *shm_file){
+#endif
+
char tmp_file[1024]="";
int i;
safe_strcat(tmp_file, file);
break;
}
}
- safe_strcat(shmfile, "/dev/shm/");
- safe_strcat(shmfile, tmp_file);
- return tmp_file;
+
+ safe_strcat(shm_file, "/dev/shm/");
+ safe_strcat(shm_file, tmp_file);
+
+#ifdef __cplusplus
+ string result(shm_file);
+ return result;
+#else
+ return 0;
+#endif
}