IO Processing Functions in C++