• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Creating large empty test file

Can anyone point me in the direction of how to create a large file to use for testing, I want a file about a gig but just filled with 1s and 0s, no actual data, but I want it to be exactly a gig. I know this can be done, just dont know how to do it. Thanks!

ps: using windows xp
 
Download VPC from microsoft (~20-40 megs?) creat a 1gig virtual disk. Set it to fixed size, not expanding. Use the hard drive for your file.

You might be able to do something clever with a page file too 😉
 
Originally posted by: Smilin
Download VPC from microsoft (~20-40 megs?) creat a 1gig virtual disk. Set it to fixed size, not expanding. Use the hard drive for your file.

You might be able to do something clever with a page file too 😉

yeah, you could probably set your page file to exactly 1 GB and then duplicate it, but Windows tends to be awfully anal about its precious "system files".
 
Originally posted by: Description
i would just write about a 10 line C program to do it.
How could that possibly take ten lines?

well, i was counting the #include statements, main, and the traditional one-brace-per-line C-style coding. There'd have to be at least one for statement, and one ifstream declaration, and the opening of the stream, and the writing to it. And we can't forget the good ole return 0; that every good programmer should put it. So if i whipped it up quick it would be like 10 lines. If you really tried, you may be able to squeeze it onto two or three, but then it depends what standard your C compiler follows.
 
Originally posted by: tkotitan2
Originally posted by: Description
i would just write about a 10 line C program to do it.
How could that possibly take ten lines?

well, i was counting the #include statements, main, and the traditional one-brace-per-line C-style coding. There'd have to be at least one for statement, and one ifstream declaration, and the opening of the stream, and the writing to it. And we can't forget the good ole return 0; that every good programmer should put it. So if i whipped it up quick it would be like 10 lines. If you really tried, you may be able to squeeze it onto two or three, but then it depends what standard your C compiler follows.

yeah, just remove all unneccesary carriage returns and spaces, lol 😛

talk about hard to read code...
 
Back
Top