Posts

Showing posts from May, 2014

Using boost::filesystem

Image
Examples of using boost::filesystem for various things as and when I encounter them... Many have been lifted from the StackOverflow site. For reasons of brevity and clarity I generally avoid extraneous code such as exception handling etc in these examples and just focus on the techniques themselves. Shortcuts to examples covered in this boost file system tutorial are as follows: 1. Copying a directory 2. Iterating over files in a directory 3. Recursively search for a file within a directory and its subdirectories 4. Counting the number of files in a directory 5. Find out when a file was last modified 6. Rename a file 7. To remove a file or directory 8. To create a directory 9. Obtaining relative paths 10. Recursively find/delete all files in a directory 1. Copying a directory This recursively uses boost::filesystem::create_directory to create a copy of a directory including its contents, sub-directories etc. For example the MyStuff folder: Use the followi...

Getting Started with TinyXml

Image
Step 1: Download and install TinyXML Download and extract the library from http://www.grinninglizard.com/tinyxml/ TinyXML source files as shown:

An editable MFC List Control

Image
A run-through on how to create a editable MFC List Control by making the CListCtrl editable. Visual Studio 2010 project downloadable from here . Much of the credit for this must go to Zafir Anjum on the Codeguru site for an article called "Editable subitems" from which this post borrows quite heavily.