Re: Seeking advice on debugging "real time" programs.
Re: Seeking advice on debugging "real time" programs.
- Subject: Re: Seeking advice on debugging "real time" programs.
- From: John Draper <email@hidden>
- Date: Wed, 05 Apr 2006 19:04:36 -0700
Alexey Proskuryakov wrote:
On 05.04.2006 11:42, "John Draper" <email@hidden> wrote:
m_MyExtIP = new char(100); returns 0x66516d0
m_MyInIP = new char(100); returns 0x66516e0 <---- Certainly
this is WRONG!!!
According to the C++ manual I have, this is supposed to allocate 100
bytes for the
string as a character array. Am I using this wrong?
In fact, this allocates a single byte, and initializes it with 100. To
allocate an array, use:
m_MyInIP = new char[100];
Or, even better, use std::vector :-)
- WBR, Alexey Proskuryakov
Oh - that was a typo... I had just typed in this function as I was
mailing this info.
I checked my code just in case, did a complete clean and build and that
seemed
to have fixed the problem.
Are you the same Alexey I met in Moscow in 1988 as the author of Tetris?
That was when the SF-Moscow teleport was in the Lennon Hotel near the
Arbot I think. Little did they know, they had internet from there... :-)
That was when Xerox machines were locked up in this room.... Strange - how
times change... :-)
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden