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

C / C++ / MFC

 
AnswerRe: How to set window size of an sdi application Pin
Michael Schubert21-Aug-08 4:42
Michael Schubert21-Aug-08 4:42 
AnswerRe: How to set window size of an sdi application Pin
SRKSHOME21-Aug-08 20:16
SRKSHOME21-Aug-08 20:16 
Questioncreating fonts [modified] Pin
neelu777921-Aug-08 0:10
neelu777921-Aug-08 0:10 
AnswerRe: creating fonts Pin
KarstenK21-Aug-08 0:58
mveKarstenK21-Aug-08 0:58 
GeneralRe: creating fonts Pin
Chris Losinger21-Aug-08 1:19
professionalChris Losinger21-Aug-08 1:19 
GeneralRe: creating fonts Pin
neelu777921-Aug-08 1:29
neelu777921-Aug-08 1:29 
Questionmember variable of STL string class Pin
George_George20-Aug-08 23:17
George_George20-Aug-08 23:17 
AnswerRe: member variable of STL string class Pin
toxcct20-Aug-08 23:51
toxcct20-Aug-08 23:51 
George_George wrote:
1. I have debugged that for small buffer (size <= 15), string will use buffer on stack, char array, and for larger buffer (>15), the space on heap is used (and destructor of string will free the space on heap), correct?


I guess only looking at the source of the string class will tell this certainty.
Personally, I'm not sure at all about this point, so i won't answer at the risk of saying a mistake.
[add] looking at the piece of code provided by CPallini, you seemed to be right here [/add]


George_George wrote:
2. What is the function of the internal member variable _Bx._Buf and _Bx._Ptr? I have posted my debug results and why sometimes _Bx._Ptr is bad ptr and sometimes _Bx._Ptr has valid content.


Again, looking at the source of the string class will ensure you about their use.
looking at the name of the attributes however, i'd say for sure that _Buf is the internal buffer of the string instance, the place which stores the characters you put within the string actually.
_Ptr may be invalid for some optimization reasons, but again here, i'm not sure at all, and stepping into the append() method code will tell you exactly how it's used and what for...


GeneralRe: member variable of STL string class Pin
George_George21-Aug-08 0:01
George_George21-Aug-08 0:01 
GeneralRe: member variable of STL string class Pin
toxcct21-Aug-08 0:03
toxcct21-Aug-08 0:03 
GeneralRe: member variable of STL string class Pin
George_George21-Aug-08 0:21
George_George21-Aug-08 0:21 
AnswerRe: member variable of STL string class Pin
CPallini20-Aug-08 23:52
mveCPallini20-Aug-08 23:52 
GeneralRe: member variable of STL string class Pin
George_George21-Aug-08 0:08
George_George21-Aug-08 0:08 
GeneralRe: member variable of STL string class Pin
CPallini21-Aug-08 0:33
mveCPallini21-Aug-08 0:33 
GeneralRe: member variable of STL string class Pin
George_George21-Aug-08 0:43
George_George21-Aug-08 0:43 
GeneralRe: member variable of STL string class Pin
CPallini21-Aug-08 0:48
mveCPallini21-Aug-08 0:48 
GeneralRe: member variable of STL string class Pin
George_George21-Aug-08 19:38
George_George21-Aug-08 19:38 
GeneralRe: member variable of STL string class Pin
CPallini21-Aug-08 21:36
mveCPallini21-Aug-08 21:36 
GeneralRe: member variable of STL string class Pin
George_George21-Aug-08 21:49
George_George21-Aug-08 21:49 
GeneralRe: member variable of STL string class Pin
CPallini21-Aug-08 22:07
mveCPallini21-Aug-08 22:07 
GeneralRe: member variable of STL string class Pin
George_George21-Aug-08 22:50
George_George21-Aug-08 22:50 
GeneralRe: member variable of STL string class Pin
CPallini21-Aug-08 23:13
mveCPallini21-Aug-08 23:13 
GeneralRe: member variable of STL string class Pin
George_George21-Aug-08 23:51
George_George21-Aug-08 23:51 
AnswerRe: member variable of STL string class Pin
Nemanja Trifunovic21-Aug-08 3:58
Nemanja Trifunovic21-Aug-08 3:58 
GeneralRe: member variable of STL string class Pin
George_George21-Aug-08 19:40
George_George21-Aug-08 19:40 

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.