printf("info[%d].m_nValue=%f\n",i,info.m_nValue);
printf("info[%d].m_fLastPV=%f\n",i,info.m_fLastPV);
printf("info[%d].m_nPointId=%d\n",i,info.m_nPointId);
sprintf(strA,"update simulatedpoint set pv=%f , LastPV=%f where ID=%d ",info.m_nValue,info.m_fLastPV,info.m_nPointId);
printf("strA=%s\n",strA);
运行结果:
info[0].m_nValue=1744.000000
info[0].m_fLastPV=14.000000
info[0].m_nPointId=1
strA=update simulatedpoint set pv=0.000000 , LastPV=0.000000 where ID=2
我想要的结果是:
strA=update simulatedpoint set pv=1744.000000, LastPV=14.000000 where ID=2