Click here to Skip to main content
15,925,400 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Reason for Debug Assertion Failed! Pin
David Crow21-Aug-08 3:25
David Crow21-Aug-08 3:25 
QuestionHow to set window size of an sdi application Pin
johnthecoder21-Aug-08 0:47
johnthecoder21-Aug-08 0:47 
AnswerRe: How to set window size of an sdi application Pin
_AnsHUMAN_ 21-Aug-08 1:16
_AnsHUMAN_ 21-Aug-08 1:16 
AnswerRe: How to set window size of an sdi application Pin
krmed21-Aug-08 1:58
krmed21-Aug-08 1:58 
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 
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 
Thanks CPallini,


Is it the best solution -- I mean saving the time to create new instance and safe code? Smile | :)

(In my sample below, there should be only one instance of string called b, correct?)

#include <string>
#include <iostream>

using namespace std;

void foo(string& b)
{
	b.append ("msdn");
	// _Bx._Buf content is msdn, _Bx._Ptr is bad ptr
	b.append (".microsoft");
	// _Bx._Buf content is msdn.microsoft, _Bx._Ptr is bad ptr
	b.append (".com");
	// _Bx._Buf content is msdn.microsoft.com, _Bx._Ptr content is msdn.microsoft.com

	return;
}

int main()
{
	string b;
	
	foo (b);
	
	cout << b << endl;

	return 0;
}



regards,
George

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.