Using AfxBeginThread for multi-thread in VS C++

Summary Two tricks about multi-thread Controlling function must be global or static Multithreading must be enabled by the application Example AfxBeginThread function Code Example Reference Summary Create a separate thread as the worker thread, which can process time consuming task like printing, computation, etc., here I am using the new thread to process the interactive with the smart card, this mechanism can enable the application to response to user’s other action (requests to user interface), such as move the window, drag the scroll bar, etc.

C++ text file process summary

Summary Read line by line to Vector Function to remove the white space Regular Expressions to remove comments Header and namespace usage Process Result Reference Summary Read out a text file line by line in C++ into string Vector, and process it accordingly, by using string process function, and regular expressions, after the processing, removed the white space, tab space, empty line, comments etc.