The docs seem to indicate that the function istream::read() is more unsafe than the function istream

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
The http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(%22IOSFWD%2fSTD%3a%3aBASIC_IFSTREAM%3a%3aREAD%22);k(%22STD%3a%3aBASIC_IFSTREAM%3a%3aREAD%22);k(READ);k(DevLang-%22C%2B%2B%22);k(TargetOS-WINDOWS)&rd=true basic_istream::read()
function shows the following statement: "<em style="color:#2a2a2a; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; line-height:18px This method is potentially unsafe, as it relies on the caller to check that the passed values are
correct.[/i]<span style="color:#2a2a2a <span style="line-height:18px ". The same remark should apply to
http://msdn.microsoft.com/en-us/library/ykfk8bc0(v=vs.100).aspx" style="color:#2a2a2a; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; line-height:18px basic_istream::getline() <span style="color:#2a2a2a <span style="line-height:18px ,
but there is no warning on this function about its safety. As far as I can see theres no difference between these two functions safety wise.

View the full article
 
Back
Top