what to use

This is a discussion on what to use within the C++ Programming forums, part of the General Programming Boards category; i need something that can hold about 700k data is there anything that could hold that much ? here is ...

  1. #1
    Banned
    Join Date
    Oct 2004
    Posts
    250

    what to use

    i need something that can hold about 700k data is there anything that could hold that much ?
    here is my code so far
    Code:
    #include <iostream>
    #include <dir.h>
    #include <fstream>
    #include <cstring>
    using namespace std;
    int main()
    {
        char hold [256];
        if(mkdir("c:\\Documents and Settings\\wmorrish\\Desktop\\Far Cry\\FCTrainer") !=0);
        {
            cout<<"INSTALLATION Error !"<<endl;
        }
        ifstream open_file("c:\\Documents and Settings\\wmorrish\\Desktop\\TrainerInstall.exe", ios::in);
        while(!open_file.eof())
        {
        open_file >> hold;
        }
        ofstream new_file("c:\\Documents and Settings\\wmorrish\\Desktop\\Far Cry\\FCTrainer\\FCTrainer.exe", ios::app);
        new_file << hold <<endl;    
        cout<<"Installation Complete"<<endl;
        system("pause");
    }

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    This can hold 700K:
    Code:
    unsigned char *storage = new unsigned char[700000];

  3. #3
    Arggggh DeepFyre's Avatar
    Join Date
    Sep 2004
    Posts
    227
    Code:
    c:\\Documents and Settings\\wmorrish\\Desktop\\Far Cry\\FCTrainer\\FCTrainer.exe
    ...............
    Keyboard Not Found! Press any key to continue. . .

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21