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

如何將字元陣列的資料分開??

0 views
Skip to first unread message

發呆外星人

unread,
Oct 27, 1998, 3:00:00 AM10/27/98
to

假如a[5]={'1','2',',','2','5'};
1 2 , 2 5
如何將12和25分開來放??
並轉成數值

--
[m○ Origin: 風之坊﹝bbs.nhctc.edu.tw﹞From: yman.Dorm6.NCTU.edu.tw

生命迴圈

unread,
Oct 28, 1998, 3:00:00 AM10/28/98
to
【 在 yyam...@bbs.nhctc.edu.tw (發呆外星人) 的大作中提到: 】
: 假如a[5]={'1','2',',','2','5'};

: 1 2 , 2 5
: 如何將12和25分開來放??
: 並轉成數值

strncpy 搭配著atoi 兩個函數就行了.

--
=========================================================================
HomePage http://stmail.fju.edu.tw/~a8474148 UIN: 18708143
mbox:a847...@stmail.fju.edu.tw "Information Management" Major.
bala...@bbs.svdcc.fju.edu.tw

[m [1;32m※ 來源:‧輔大美少女夢工場 bbs.svdcc.fju.edu.tw‧[FROM: TS3-PPP-19.fju.] [m

0 new messages