Click here to Skip to main content
15,885,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Figuring Out How to Test Code Pin
Richard MacCutchan17-Nov-17 21:43
mveRichard MacCutchan17-Nov-17 21:43 
GeneralRe: Figuring Out How to Test Code Pin
Member 1352762519-Nov-17 10:34
Member 1352762519-Nov-17 10:34 
GeneralRe: Figuring Out How to Test Code Pin
Victor Nijegorodov19-Nov-17 21:07
Victor Nijegorodov19-Nov-17 21:07 
GeneralRe: Figuring Out How to Test Code Pin
Richard MacCutchan19-Nov-17 21:49
mveRichard MacCutchan19-Nov-17 21:49 
GeneralRe: Figuring Out How to Test Code Pin
CPallini21-Nov-17 21:51
mveCPallini21-Nov-17 21:51 
AnswerRe: Figuring Out How to Test Code Pin
jschell20-Nov-17 6:26
jschell20-Nov-17 6:26 
AnswerRe: Figuring Out How to Test Code Pin
ThatsAlok20-Nov-17 20:10
ThatsAlok20-Nov-17 20:10 
QuestionC++ formatting into a buffer - why so elephanting difficult? Pin
charlieg16-Nov-17 3:15
charlieg16-Nov-17 3:15 
The good news is that this isn't a homework question or comment - I'm tossing this out to C++ veterans for some direction. I'd ask in S.O. but ugh, I'm sure I'd get shamed or start a flame war on why this is a redundant question.

I cut my development teeth on C and happily moved on to C++. I have also worked in a mixed development shop for what seems like forever. Most of the UI development is in C++ of some flavor - some variant of MS depending on what tool we need to use, other tools from other vendors. However, we're always talking to embedded systems, and most of the guys are almost always pure C developers - even if the do run it through a C++ compiler Smile | :) .

For the C++ code, I would love to be pure C++, especially when it comes to string handling. Current development for one side is in VS2008, and we have a mix of C++ std::wstring and CStrings (mfc). On the embedded side, usually std::wstring but mostly char bufs. I really don't care that much about the embedded side (actually I do), but I would surely love to come up with a general approach on my side.

Which leads me to the question - why is it so elephanting difficult to format a string into a buffer in standard C++? I know I can add on other libraries, but for the sake of discussion, let's say I'm not allowed to use boost, mfc, etc.

Sure, I've done my google, but it seems to me that C++ has taken purity to the level of uselessness. I'm sure I'll be burned at the stake for that, or maybe I've not found my "aha!" moment.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...

"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

AnswerRe: C++ formatting into a buffer - why so elephanting difficult? Pin
Jochen Arndt16-Nov-17 3:51
professionalJochen Arndt16-Nov-17 3:51 
GeneralRe: C++ formatting into a buffer - why so elephanting difficult? Pin
charlieg16-Nov-17 5:20
charlieg16-Nov-17 5:20 
AnswerRe: C++ formatting into a buffer - why so elephanting difficult? Pin
Richard MacCutchan16-Nov-17 4:00
mveRichard MacCutchan16-Nov-17 4:00 
GeneralRe: C++ formatting into a buffer - why so elephanting difficult? Pin
charlieg16-Nov-17 5:21
charlieg16-Nov-17 5:21 
GeneralRe: C++ formatting into a buffer - why so elephanting difficult? Pin
Richard MacCutchan16-Nov-17 21:28
mveRichard MacCutchan16-Nov-17 21:28 
AnswerRe: C++ formatting into a buffer - why so elephanting difficult? Pin
Maximilien16-Nov-17 5:45
Maximilien16-Nov-17 5:45 
GeneralRe: C++ formatting into a buffer - why so elephanting difficult? Pin
charlieg16-Nov-17 11:11
charlieg16-Nov-17 11:11 
AnswerRe: C++ formatting into a buffer - why so elephanting difficult? Pin
jschell16-Nov-17 13:27
jschell16-Nov-17 13:27 
GeneralRe: C++ formatting into a buffer - why so elephanting difficult? Pin
charlieg17-Nov-17 7:17
charlieg17-Nov-17 7:17 
GeneralRe: C++ formatting into a buffer - why so elephanting difficult? Pin
jschell17-Nov-17 10:45
jschell17-Nov-17 10:45 
GeneralRe: C++ formatting into a buffer - why so elephanting difficult? Pin
CPallini23-Nov-17 22:29
mveCPallini23-Nov-17 22:29 
GeneralRe: C++ formatting into a buffer - why so elephanting difficult? Pin
charlieg29-Nov-17 11:19
charlieg29-Nov-17 11:19 
GeneralRe: C++ formatting into a buffer - why so elephanting difficult? Pin
CPallini29-Nov-17 11:42
mveCPallini29-Nov-17 11:42 
AnswerRe: C++ formatting into a buffer - why so elephanting difficult? Pin
Rick York25-Nov-17 19:53
mveRick York25-Nov-17 19:53 
QuestionCStatic::Drawitem gets called repeatledly Pin
ForNow15-Nov-17 16:35
ForNow15-Nov-17 16:35 
AnswerRe: CStatic::Drawitem gets called repeatledly Pin
Jochen Arndt15-Nov-17 21:15
professionalJochen Arndt15-Nov-17 21:15 
GeneralRe: CStatic::Drawitem gets called repeatledly Pin
ForNow17-Nov-17 3:42
ForNow17-Nov-17 3:42 

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.