Click here to Skip to main content
15,914,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: std::string to float Pin
Cedric Moonen4-May-06 20:45
Cedric Moonen4-May-06 20:45 
AnswerRe: std::string to float Pin
Michael Dunn4-May-06 8:38
sitebuilderMichael Dunn4-May-06 8:38 
NewsRe: std::string to float Pin
Roland Pibinger4-May-06 10:41
Roland Pibinger4-May-06 10:41 
GeneralRe: std::string to float Pin
Michael Dunn4-May-06 10:53
sitebuilderMichael Dunn4-May-06 10:53 
QuestionRe: std::string to float Pin
led mike4-May-06 11:56
led mike4-May-06 11:56 
JokeRe: std::string to float Pin
David Crow5-May-06 2:24
David Crow5-May-06 2:24 
GeneralRe: std::string to float Pin
Rob Caldecott4-May-06 13:18
Rob Caldecott4-May-06 13:18 
GeneralRe: std::string to float Pin
Stephen Hewitt4-May-06 15:06
Stephen Hewitt4-May-06 15:06 
I would like to know why not too. While MSVC6s STL implementation is crap and it would be more efficient to use the old C-style functions, other STL versions are more efficient and have less overhead. Efficiency issues aside, there are many advantages to the stringstream solutions such as that fact that it's extensible and you can change the type your converting to simply by changing variable your reading into instead of having to change the function called. The intent is also clearer as the C style function names are obscure to say the least. Another issue is the fact that STL implementations are allowed to implement basic_string in a manner such that calling c_str is not as efficient as the programmer might think. One example is basic_string implementations which don’t use a single contiguous memory block to store the string.

Steve

-- modified at 21:50 Thursday 4th May, 2006
QuestionTray icon notifier when usb plugging Pin
asancho4-May-06 6:32
asancho4-May-06 6:32 
AnswerRe: Tray icon notifier when usb plugging Pin
toxcct4-May-06 6:44
toxcct4-May-06 6:44 
GeneralRe: Tray icon notifier when usb plugging Pin
asancho5-May-06 1:36
asancho5-May-06 1:36 
QuestionXML string to DataTable Pin
lsugirljte4-May-06 6:27
lsugirljte4-May-06 6:27 
GeneralRe: XML string to DataTable Pin
lsugirljte4-May-06 6:29
lsugirljte4-May-06 6:29 
QuestionAppending text to a richedit Pin
KellyR4-May-06 6:05
KellyR4-May-06 6:05 
AnswerRe: Appending text to a richedit Pin
Justin Tay4-May-06 12:17
Justin Tay4-May-06 12:17 
Questionmonitoring print dialog box Pin
Atron4-May-06 4:58
Atron4-May-06 4:58 
QuestionThank you Pin
Charles Reese4-May-06 4:51
Charles Reese4-May-06 4:51 
AnswerRe: Thank you Pin
toxcct4-May-06 5:22
toxcct4-May-06 5:22 
GeneralRe: Thank you Pin
Eytukan4-May-06 6:12
Eytukan4-May-06 6:12 
QuestionUrgent: Trapping documentcomplete event in IE browser Pin
rana744-May-06 4:19
rana744-May-06 4:19 
AnswerRe: Urgent: Trapping documentcomplete event in IE browser Pin
led mike4-May-06 7:52
led mike4-May-06 7:52 
AnswerRe: Urgent: Trapping documentcomplete event in IE browser Pin
Sheng Jiang 蒋晟4-May-06 15:10
Sheng Jiang 蒋晟4-May-06 15:10 
QuestionOle DB for OLAP Pin
Tarek Jabri4-May-06 4:13
Tarek Jabri4-May-06 4:13 
AnswerRe: Ole DB for OLAP Pin
Steve Echols4-May-06 20:03
Steve Echols4-May-06 20:03 
QuestionOle DB for OLAP Pin
Tarek Jabri4-May-06 4:11
Tarek Jabri4-May-06 4:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.