#include <iostream>
#include <string>
#include <sstream>
#include <time.h>
int main()
{
std::cout << "Hello World!\n";
srand(time(NULL));
int r = rand();
while (r <= 9)
{
r = rand();
}
/*r = 0;*/
std::cout << r << std::endl;
std::string fname = "Test.txt"; //"./Test.txt"
std::stringstream sstr;
sstr << r;
std::string temp;
sstr >> temp;
fname += temp;
FILE* fp = fopen(fname.c_str(), "w");
fclose(fp);
for (int i = 0; i < fname.size(); i++)
{
printf("%d ", fname[i]);
}
printf("%d\n", strlen(fname.c_str()));
}