系统不兼容,我认为是这样的
#include <reg52.h>
#include <stdio.h>
void main(void)
{
SCON=0X52;
TMOD=0X20;
TH1=0XF3;
TR1=1;
printf("hello i am kell." \n); 我觉得加上双引号比较好
printf("i will be your friend." \n);
while(1);
}
最好这样写
但是也报错了
Build target 'Target 1'
compiling 1.c...
..\程序\1.C(10): error C141: syntax error near '\'
..\程序\1.C(11): error C141: syntax error near '\'
Target not created
追问![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/4bed2e738bd4b31ceb00073787d6277f9e2ff87a?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
用你的程序后的报错。不知是什么原因
追答你为什么在单片机里面运行 printf("hello i am kell." \n);
本回答被提问者和网友采纳