Click here to Skip to main content
15,921,793 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Program compiled, but produced no ".exe" file. Pin
WREY3-Sep-03 11:05
WREY3-Sep-03 11:05 
QuestionHow can I deselect an Item in a Tree Control Pin
Binayak3-Sep-03 8:52
Binayak3-Sep-03 8:52 
AnswerRe: How can I deselect an Item in a Tree Control Pin
Brian Shifrin3-Sep-03 11:35
Brian Shifrin3-Sep-03 11:35 
GeneralBrowse button Pin
svinn3-Sep-03 8:43
svinn3-Sep-03 8:43 
GeneralRe: Browse button Pin
David Crow3-Sep-03 10:42
David Crow3-Sep-03 10:42 
GeneralInsert a Delay over ethernet Pin
NewHSKid3-Sep-03 8:25
NewHSKid3-Sep-03 8:25 
GeneralRe: Insert a Delay over ethernet Pin
John M. Drescher3-Sep-03 10:30
John M. Drescher3-Sep-03 10:30 
GeneralRe: Insert a Delay over ethernet Pin
NewHSKid3-Sep-03 13:34
NewHSKid3-Sep-03 13:34 
GeneralRe: Insert a Delay over ethernet Pin
John M. Drescher3-Sep-03 13:49
John M. Drescher3-Sep-03 13:49 
GeneralRe: Insert a Delay over ethernet Pin
NewHSKid3-Sep-03 16:07
NewHSKid3-Sep-03 16:07 
GeneralRe: Insert a Delay over ethernet Pin
John M. Drescher3-Sep-03 17:11
John M. Drescher3-Sep-03 17:11 
QuestionHow to remove nulls from void pointer. Pin
Brian Farrell3-Sep-03 7:38
Brian Farrell3-Sep-03 7:38 
AnswerRe: How to remove nulls from void pointer. Pin
dog_spawn3-Sep-03 7:52
dog_spawn3-Sep-03 7:52 
GeneralRe: How to remove nulls from void pointer. Pin
l a u r e n3-Sep-03 9:03
l a u r e n3-Sep-03 9:03 
GeneralRe: How to remove nulls from void pointer. Pin
Brian Farrell3-Sep-03 10:33
Brian Farrell3-Sep-03 10:33 
GeneralRe: How to remove nulls from void pointer. Pin
David Crow3-Sep-03 10:49
David Crow3-Sep-03 10:49 
GeneralRe: How to remove nulls from void pointer. Pin
Brian Farrell3-Sep-03 11:33
Brian Farrell3-Sep-03 11:33 
QuestionIs one way better than the other? Pin
RobJones3-Sep-03 7:34
RobJones3-Sep-03 7:34 
AnswerRe: Is one way better than the other? Pin
Maximilien3-Sep-03 8:03
Maximilien3-Sep-03 8:03 
GeneralRe: Is one way better than the other? Pin
dog_spawn3-Sep-03 8:07
dog_spawn3-Sep-03 8:07 
GeneralRe: Is one way better than the other? Pin
RobJones3-Sep-03 8:18
RobJones3-Sep-03 8:18 
GeneralRe: Is one way better than the other? Pin
dog_spawn3-Sep-03 9:37
dog_spawn3-Sep-03 9:37 
GeneralRe: Is one way better than the other? Pin
Alvaro Mendez3-Sep-03 10:46
Alvaro Mendez3-Sep-03 10:46 
GeneralRe: Is one way better than the other? Pin
RobJones3-Sep-03 8:16
RobJones3-Sep-03 8:16 
GeneralRe: Is one way better than the other? Pin
Brad Sokol3-Sep-03 8:33
Brad Sokol3-Sep-03 8:33 
The following two lines are equivalent:

<br />
std::string s1("one");    // Example 1<br />
std::string s2 = "two";   // Example 2<br />


If I recall correctly, there is a standard "short-cut" that compilers can (must?) take to make example 2 above work like example 1. In other words, declaration with assignment is optimised to a constructor provided that an appropriatly overloaded constructor exists. If no constructor, you get a compiler error.

Either would likely be faster then default constructor followed by Format() for two reasons. First, it's two steps. Second, Format() is probably slow with all that string parsing. Of course, YMMV.




Brad

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.