Recent content by duydaniel

  1. D

    C/C++ File Processing via seekp and seekg C++

    Hello Reid, Thanks a lot. I suspected it was wrong but kept trying somehow :( I think it is self sorted in binary file? Instead of using 16 digits to move the pointer, I now use the last four digits. The possibility is 0 -> 9999 so I just need 10000 empty records to store them. When I use...
  2. D

    C/C++ File Processing via seekp and seekg C++

    Thanks Reid for the binary :D I use VS 2008 Pro SP1. It is now showing in binary mode now. I think the error (doesn't write) is actually because of the nature of create 1000 empty objects. When the method create file with 1000 empty slots and set them into a file, their location will be //...
  3. D

    C/C++ File Processing via seekp and seekg C++

    Hi Reid, the file.clear(); is to reset end-of-file indicator. I never heard of a binary editor before :( I use notepad to open up the data.dat file after generated 1000 empty records... it shows garbage. like this : ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ...
  4. D

    C/C++ File Processing via seekp and seekg C++

    Dear Reid, Yeah, I think I did. Here is the code in main int main() { //createFile(); fstream file("data.dat",ios::in|ios::out|ios::binary); if (!file) { cerr << "Can't open file"; exit(1); } int choice; while ((choice = enterChoice()) != 4) { switch (choice) { case 1...
  5. D

    C/C++ File Processing via seekp and seekg C++

    Hello, I am working on a program about credit card that basically, generate 16 ramdom digits, a starting balance and write it to a file. The file works as an database and can be updated later. Here is my credit card class class CCard { // variables section private: //sixteen digits of a...
  6. D

    Calculators Which calculator? Hp 50G vs Ti89 Titanium

    Hi, nice to hear that. Actually, here is the few things you may need to consider when purchasing an HP 50g. + You may need a external AC power supply for your HP 50g. You can get one for cheap at hpcalc.org + Download the latest ROM from HP website to upgrade the calc + Use rechargeable...
Back
Top