So much for the edit but anyways I got this from anoutehr post that I needed help in. I needed to know hwo to save a game.
So I got this code...
Code:
#include <fstream>
int var1 = 20;
int var2 = 30;
struct TestClass
{
int objVar1;
double objVar2;
};
TestClass test;
int main()
{
test.objVar1 = 5;
test.objVar2 = 4.5283928334328;
std::ofstream file("filename.dat", std::ios::binary);
file.write((char*)&var1, sizeof(var1));
file.write((char*)&var2, sizeof(var2));
file.write((char*)&test, sizeof(test));
file.close();
return 0;
}
.dat files or what ever I am goign to try and use. I could have a "plug in" maker type thing that creates .dat files! All I need is a ton of variables (wich I am good at) and other stuff!