سلام.
برای نوشتن انواع داده تو فایل مشکل دارم هر کاری می کنم هم درست نمیشه.
std::ofstream o_strm(my_file);
int a = 100;
float b = 200.f;
std::string c = "hello";
o_strm << a << b << c;
o_strm.close();
std::ifstream i_strm(my_file);
int a1;
float b1;
std::string c1;
i_strm >> a1 >> b1 >> c1;
i_strm.close();
cout << a1 << ","<< b1 <<"," << c1 << endl;