Kiedy stosuję stoi to wszystko jest ok ale kiedy zmienię na reinterpret_cast to x ma inną wartość i nie wiem dlaczego
void zapisz_do_pliku_part2(int n, int g) {
ifstream zfile("samodopelniajace.txt");
string word;
int x;
vector<TGraph> v(g);
int i,j,k=0;
if (zfile.is_open()) {
for (k = 0; k < g; k++)
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
{
zfile >> word;
cout << "word:" << word << endl;
x =reinterpret_cast<int>(&word);
cout <<"x:"<< x<<endl;
v[k].A[i][j] = x;
}
}
}