hello i want to open and then write into a file until it size gets to a specific size , let say for example 100 MB. and then after the first file reach to 100 MB size i want to open the next file and to the same until all of the data was taken...
so first off all how can i write something like:"while(my File size < 100 MB" ?
and second how can i open another file while i don't know how many file i need to open? should i use Dynamic memory allocation? and how can i give all of the files the same name but with different number like myfile_1,myfile_2...
for now this is the code that i written
/while(myfile_1.size<100 MB) ***this is the part that i need help
///write data into myfile. ****dont need help here.
after the while loop i want to open new file and name him like the first one but with +1 on its number(myfile_1,myfile_2.myfile_3...)?