nsstring and const char* conversion
<p>i try to convert nsstring to const char*.</p>

<p>1- i add a nsstring and an integer together<br>
2- then i convert this new nsstring to const char*<br>
3- i have an object and i attribute this new nsstring as my object's name.<br>
4- i use this object in another function</p>

<blockquote>
  <p>NSString* firstName = [NSString stringWithFormat: @"Name%d", 1];<br>
  const char* secondName = [firstName cString];<br>
  myobject->setName(secondName);</p>
</blockquote>

<p>problem :  A<br>
1- secondName is null when i use my object in my function.<br>
2- but if i replace firstName by : firstName = "Name1";<br>
3- it works</p>

<p>problem B<br>
1- if i replace const char* secondName = [firstName cString];<br>
by  const char* secondName = [macString UTF8String];<br>
2- even if i have firstName = "Name1";<br>
3- this is not working !!</p>

<p>any idea ??</p>

<p>thank you </p>

<p>:=)</p>
