标签:
1、long类型到char类型转换
long a=1; char * objid=(char *)malloc(10*sizeof(char)); //分配内存 sprintf(objid,"%d",a);
2、拼接char字符串
long aa=pFeature->GetFID(); char * objid=(char *)malloc(10*sizeof(char)); //分配内存 sprintf(objid,"%d",aa); const char * pointid=fea->GetFieldAsString("管线编号"); char sql[200]="update point set 对应管线=‘"; strcat(sql,pointid); strcat(sql,"‘ where OBJECTID="); strcat(sql,objid);
标签:
原文地址:http://www.cnblogs.com/GIScore/p/5553814.html