Console string input in C & C++ using fgets() & cout