TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: Jasen Betts
from: Tulipant Gergely
date: 2003-01-05 08:44:00
subject: There`s gotta be an easi

Jasen Betts -> Neil Heller >>There's gotta be an easi<< {at} 25
Dec 02  19:33:40

 JB> I has a little look in my C++ manual (it's not very good) and I couldn't
 JB> find "cstring" so I'm guessing you're just using C
strings (type char*)

  Nah, it must be something like the now standard C++ string class.
  You can't just return with pointers to local char arrays from a function.
The "=" operator must be overloaded for cstring: it must realloc
if necessary and copy the new string to its buffer.

 NH> char firststr[10]={0}, secondstr[10]={0};
 NH> pchar unused = itoa(first, firststr, 10);
 NH> unused = itoa(second, secondstr, 10);
 NH> target->info[1] = firststr;
 NH> target->info[3] = secondstr;

--- SkyReader/Linux v1.01a-7
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
SEEN-BY: 633/267 270
@PATH: 106/2000 1 379/1 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.