Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

·Q½Ð°Ý¤@¤Ustringªº«þ¨©

0 views
Skip to first unread message

CBT

unread,
Apr 2, 2003, 9:56:43 PM4/2/03
to

char* name;
string temp( "temp" );
name = new char[temp.length() + 1];
strcpy( name, temp.c_str() );
cout << name << endl;

雞婆的附上一個 test 的程式,
別忘了 name 在最後有 memory leak 喔 :)
--
[0m [1;33m※ Origin: [36mYahoo!奇摩 大摩域 [37m<telnet://bbs.kimo.com.tw> [m
[1;35m◆ From: [1;32m1cust9.tnt3.troy.oh.da.uu.net [m

0 new messages