• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Seeking advice on debugging "real time" programs.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Seeking advice on debugging "real time" programs.
      • From: Alexey Proskuryakov <email@hidden>
References: 
 >Re: Seeking advice on debugging "real time" programs. (From: Alexey Proskuryakov <email@hidden>)

  • Prev by Date: Re: A Note on your ADC Confidentiality Agreement
  • Next by Date: dlopen() on 10.3 and static initializers
  • Previous by thread: Re: Seeking advice on debugging "real time" programs.
  • Next by thread: Re: Seeking advice on debugging "real time" programs.
  • Index(es):
    • Date
    • Thread