Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void file_read(char file_name[100], &base_mem[1000]);
- ....
- file_read("base.txt", &base_mem);
- ....
- void file_read(char file_name[100], &base_mem[1000]){
- int i [100]; i[0]=1; while (i[0]!=100) {i[i[0]]=0;i[0]++;} i[0]=0;// счетчики на ноль
- i[0]=0; while (i[0]!=300) {base_mem[i[0]]=NULL;i[0]++;} i[0]=0;//файл в памяти на ноль
- fstream base_file(file_name, ios::in /*| ios::out*/);// открываем файл
- while (!base_file.eof()){
- base_file.read((char*)&base_mem[i[7]],sizeof(base_mem[i[7]]));
- i[7]++;}
- base_file.close(); // закрываем файл
- }
Add Comment
Please, Sign In to add comment