Reputation: 299
if I do something like this
ifstream stat_stream("filepath",ios_base::in);
char pid[128];
stat_stream >> pid;
is c++ going to do any implicit conversions of my char[] (to a std::string say) or will it leave it as is?
Edit: For clarity, I want to ensure that this is as asynchronous signal safe as it is possible to be when file io is necessary. I really only meant the implicit conversions as an example of an operation that would be unacceptable.
Upvotes: 0
Views: 51
Reputation: 1698
C++ does not implicitly change your char[] to a std::string. You can tell the type by doing: cout<<typeid(pid).name()<<endl;
Hope this help.
Upvotes: 1