谁能帮我从microbasic到MikroC的转换?
在MB:
FormattedDataString = text + "," + text1 + "," + text2 .我在C方面的努力FormattedDataString = (text + "," + text1 + "," + text2);char FormattedDataString [100];字符文本、text1 text2。
的问候Sarel
您需要的是函数strcat
。原型定义为:
char *strcat(char *to, char *from);
第一行将使用strcpy
将文本复制到FormattedDataString。原型定义为:
char *strcpy(char *to, char *from);
就像
strcpy(FormattedDataString, text);
strcat(FormattedDataString, ",");
strcat(FormattedDataString, text1);
strcat(FormattedDataString, ",");
strcat(FormattedDataString, text2);
请参考MikroC的帮助部分