ythtBBS安装编译问题

出错程序:
int
frame_input(int pid)
{
 printf("<script language=/"JavaScript/">
 function r1() {
出错信息:
bbsnewchat.c:88:16: missing terminating " character
解决方法:
编译安装ythtBBS时,常遇到这样的错误提示。因为编译器对字符串的处理方式不

同,所以会出现以上的错误。解决的方法,是在出错行的字符串结尾加上“(分号

)。
因为
一般语句里面换行写没问题 比如
printf("12345"
   "67890/n"); //输出1234567890,注意这里5后面的"和6前面的"号,上面出错

程序就是犯了这样的错误。
又比如
printf("123"
   "456"
   "789"
   "/n");
#define的话要写在一行里面,或者用/,比如
#define ABC "12345" /
   "67890"
bbsnewchat.c:294:36: warning: character constant too long for its type
bbsnewchat.c:294: error: stray '/300' in program
bbsnewchat.c:294: error: stray '/353' in program
bbsnewchat.c:294: error: stray '/277' in program
bbsnewchat.c:294: error: stray '/252' in program
bbsnewchat.c:294: error: stray '/262' in program
bbsnewchat.c:294: error: stray '/350' in program
bbsnewchat.c:294: error: stray '/271' in program
bbsnewchat.c:294: error: stray '/335' in program
bbsnewchat.c:295:19: warning: character constant too long for its type
bbsnewchat.c:295: error: stray '/301' in program
bbsnewchat.c:295: error: stray '/304' in program
bbsnewchat.c:295: error: stray '/314' in program
bbsnewchat.c:295: error: stray '/354' in program
bbsnewchat.c:295: error: stray '/312' in program
bbsnewchat.c:295: error: stray '/322' in program
bbsnewchat.c:295: error: stray '/260' in program
bbsnewchat.c:295: error: stray '/357' in program
bbsnewchat.c:295: error: stray '/326' in program
bbsnewchat.c:295: error: stray '/372' in program
出错信息里的/***(比如/372)是汉字,出错的原因是因为gcc版本的处理方式,

301是汉字,有的编译器字符串可以跨多行,有的编译器不行。上面的出错就是因

为编译器的版本问题。解决的方法是,在每行的后面加上一个 /(表示换行) 就可

以了。                                                       

待续

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值