How come im not getting the value for health?
Gold is receiving the values, but health isn't? What is the problem?Code:#include <iostream> #include <fstream> #include <string> using namespace std; int main() { string filebuffer = ""; int gold; int health; ifstream file("file.add"); file.flags(ios::hex); file >> gold; file >> health; cout << (int*)gold<<endl; cout <<gold<<endl; cout <<health<<endl; return 0; }
I'm having this problem for memory adress stuff for about 2 hours now...