This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / how to get?I have a string, like "1060732951|0.00429|1|Default status|29576|6384",
I want to get epoch=1060732951, second=0.00429, tmp=1,
string = "Default status", in= 29576, out = 6384,
how to get these using C.
thanks.
-oasis(oasis);
2003-8-19
{225}
(#1337734@0)
-
See the code
-willington(居无定所);
2003-8-19
{588}
(#1338049@0)
-
Some correctionsSomehow, the cut-past lost some characters. The while-loop is supposed to be like
while (sLine[index] && sLine[index] != '\n' && sLine[index] != '\r ')
Also you might not need function "trim" if the leading spaces are not a problem. fields[count++] = &sLine[index++];
-willington(居无定所);
2003-8-19
{280}
(#1338062@0)