How can I get an ID number read from a file to print out as xxx-xx-xxxx ?
it is read as numbers from the file but how can I get it to print with hyphens using modulus?
I've tried printing numbers per line etc. before but I'm not sure how to print hyphens on an ID number. Thanks in advance
Of course, now all numbers on your stream will be formatted that way. If that is too much, you can write a couple of methods to imbue on a stringstream, or a specialized SSN type with overloaded I/O operators, or just a manipulator to do it, along the lines of this post http://www.cplusplus.com/forum/beginner/13044/#msg62827 (you don't need the word mutable anymore).