|
|
char[]
or allocated char*
. You can use fgets() directly or you can use something like I posted here:';'
) and replace it with a null ('\0'
) -- thus getting rid of it and ignoring everything on the line that follows.You can just do int *array=malloc(100000*sizeof(int)); |
malloc(100000*sizeof(int))
would fail -- vectors use continuous space. Instead, use a deque <int>
, which, like an array of arrays, allows the OS/freestore management to make things fit.Is there a way -- during reading a file, to append new data (in the middle of the file) and everything below it get's moved down? |