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

請問如何拆一連續的字串到一指定的位置

0 views
Skip to first unread message

tango200

unread,
Feb 5, 2002, 9:25:08 AM2/5/02
to
請教各位先進

假設有一字串

char temp2[1000];//資料來源
int buffer2[200];//資料處理後存放的地方

字串資料如下所示(全部共800共個字元 temp2[0]~temp2[799]):
資料型態只能宣告成16bit,不能宣告超過16bit,

例如:0001 的資料range從0000~FFFF

請問可以用何種方法將0001存到buffer2[0](temp2[0]~[3]經由拆字串,資料轉換後存到
該區域),
0002存到buffer2[1]](temp2[4]~[7]經由拆字串,資料轉換後存
到該區域),........
4個字元1組,總共200組

000100020003000400050006000700080009001000110012001300
1400150016001700180019002000210022002300240025002600270028002900300031003200
3300
3400350036003700380039004000410042004300440045004600470048004900500051005200
5300
5400550056005700580059006000610062006300640065006600670068006900700071007200
7300
7400750076007700780079008000810082008300840085008600870088008900900091009200
9300
9400950096009700980099010001010102010301040105010601070108010901100111011201
1301
1401150116011701180119012001210122012301240125012601270128012901300131013201
3301
3401350136013701380139014001410142014301440145014601470148014901500151015201
5301
5401550156015701580159016001610162016301640165016601670168016901700171017201
7301
7401750176017701780179018001810182018301840185018601870188018901900191019201
9301
94019501960197019801990200

0 new messages