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: Alexey Proskuryakov <email@hidden>
- Date: Wed, 05 Apr 2006 12:50:35 +0400
- Thread-topic: Seeking advice on debugging "real time" programs.
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
_______________________________________________
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