You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
274 B

#include "tool.h"
char* str2char(string str)
{
rsize_t num = str.length() + 1;
char* strc = new char[num];
strcpy_s(strc, num, str.c_str());
return strc;
}
string num2str(int num)
{
stringstream ss;
string str_num;
ss << num;
ss >> str_num;
return str_num;
}