Új hozzászólás Aktív témák
-
sekli
addikt
helo, gyors segitsegre lenne szuksegem, igy mukodik tokeletesen:
ifstream in("teszt.txt", ios::in | ios::binary);
if(!in) {
cout << "Cannot open file.\n";
return 1;
}
int m[10];
in.read((char *) &m, sizeof (m));
for(i = 0; i <10; i++) // show values read from file
cout << m[i] << " ";
in.close();igy viszont nem:
ifstream in("teszt.txt", ios::in | ios::binary);
if(!in) {
cout << "Cannot open file.\n";
return 1;
}
int *m=new int(10);
in.read((char *) &m, sizeof (m));
for(i = 0; i <10; i++) // show values read from file
cout << m[i] << " ";
in.close();miert nem...?
Új hozzászólás Aktív témák
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- Apple Pad 5.generácio / 32GB / Wi-fi / 12Hó garancia
- Samsung S23+ 256GB Állapot: 10/10 6 hónap jótállás!
- Telefon felvásárlás!! iPhone 13 Mini/iPhone 13/iPhone 13 Pro/iPhone 13 Pro Max
- Xiaomi 15 256GB, Kártyafüggetlen, 1 Év Garanciával
- Törött Apple iMac 19.2 i5-8500 Radeon Pro 560X 4GB 16GB 256GB SSD 21.5" 4K Retina
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Promenade Publishing House Kft.
Város: Budapest