在线急问,sscanf函数
jenhi 2007-12-24 01:46:28 #define DATA_FORMAT "%[^,],%[^,],%[^,],%[^,],%[^,],"\
"%[^,],%[^,],%[^,],%[^,],%[^\n]"
字符串dataLine="2,remote_only,local,,,,remote,03,ADFADFFGLERT,PQERUT"
scanfRt = sscanf(dataLine,DATA_FORMAT,
tmpbuf[0], tmpbuf[1], tmpbuf[2], tmpbuf[3],
tmpbuf[4], tmpbuf[5], tmpbuf[6], tmpbuf[7],
tmpbuf[8], tmpbuf[9]);
执行后,tmpbuf[3]以及之后的,都为\0,这是怎么回事?