I am reading data from a file and i need to read in a lot of data, approaching millions of lines proabably.
the problem i have is i have declared a struct to store the data but i have found that the maximum array of structs i can have is:
users db ;
Anyone know why this is and how i can change it to accept a larger amount of data. my struct is simple:
string user ;
char ip ;
Use dynamic memory allocation. Its pretty simple. You just determine how many structs you are going to require then allocate that much room...
// init size to whatever you need at run-time
users *pUsers = new users[ size ];
if( !pUsers )
// couldn't allocate memory...
delete  pUsers;
Thanks MrWizard dynamic memory allocation worked a treat.
Salem: Interesting to know that, any idea how you can change the limits imposed by the OS/Compiler or are they set.
Thanks a lot for your help.