C++ Make a file of a specific size
问题 Here is my current problem: I am trying to create a file of x MB in C++. The user will enter in the file name then enter in a number between 5 and 10 for the size of the file they want created. Later on in this project i'm gonna do other things with it but I'm stuck on the first step of creating the darn thing. My problem code (so far): char empty[1024]; for(int i = 0; i < 1024; i++) { empty[i] = 0; } fileSystem = fopen(argv[1], "w+"); for(int i = 0; i < 1024*fileSize; i++){ int temp = fputs