On this entry we cover a question that appears a lot on the boards in a variety of languages. Reading lines of a file into an array, vector or arraylist. I have several examples lined up for you to show you some of the ways you can accomplish this in C++ as well as Java. Keep in mind that these examples are very simplistic in nature and designed to be ...
Ever wanted to dig through a text file and see how many times a particular word appears? Are you afraid the file is going to jump up and bite you and bite you hard?!? Don't sweat it. That crazy file isn't going to be too much trouble if you know some useful classes for dealing with the situation. In this entry we talk about opening a file using a BufferedReader, ...
It was asked recently how one might go about changing the various access times (last modified, creation date etc) of an existing file through C/C++. The idea we will show you below takes advantage of a few functions in windows.h for altering file and system times. And no it can't be used on your homework to change the due date. And no it doesn't include the creation of a flux ...
File handling can be a bit daunting to the beginner. We all know what a file is, but how to access and use even the simplest text files through a program can make our brains go to mush. That is because programs see files as streams of data. It opens access to a file and pulls in that data as a stream in either chunks or in a serial (single ...
We have had a few questions on the board in recent times asking about the best way to show the progress of a long running process; such as file reading of a HUGE file. If you have a file with tens or hundreds of thousands of lines, or datasets which may have millions of records, it is going to take some time to process. It is fine that it takes ...
Commercial: Are those old Dialogs and Files in your cupboard collecting dust? Are you tired of having to take them out, trying to use them, only to spill code all over your beautiful new sweater? Are your kids crying and telling you that you need to move those files to another part of the house so that they can play with their toys in a safe and healthy environment? Well ...