找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 13791|回復(fù): 7
打印 上一主題 下一主題
收起左側(cè)

error C129: missing ';' before 'temp' 怎么解決! 關(guān)于流水燈的問題 小白求教

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:169445 發(fā)表于 2017-3-9 17:29 | 只看該作者 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式
#include<reg52.h>
#include<intrins.h>
#define uint unsigned int
#define uchar unsigned char
unchar temp;
void delay(uint);
void main();
{
        
        temp=0xfe;
           P1=temp;
                while(1)
{
        temp=_crol_(temp,1);
    delay(600);
           P1=temp;        
}
}void delay(uint z)
{
        uint x;
        uchar y;
        for(x=z;x>0;x--)
                for(y=20;y>0;y--);        
}
出現(xiàn)問題1_1.C(5): error C129: missing ';' before 'temp'  怎么解決!。。。。。。。。。。。。。!

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復(fù)

使用道具 舉報(bào)

沙發(fā)
ID:165046 發(fā)表于 2017-3-9 18:08 | 只看該作者
改成
#define uint unsigned uint
#define uchar unsigned uchar
回復(fù)

使用道具 舉報(bào)

板凳
ID:165046 發(fā)表于 2017-3-9 18:09 | 只看該作者
然后
unchar temp;
改成 uchar temp;
回復(fù)

使用道具 舉報(bào)

地板
ID:155507 發(fā)表于 2017-3-9 18:24 | 只看該作者
unchar temp;
改成 uchar temp;
回復(fù)

使用道具 舉報(bào)

5#
ID:169445 發(fā)表于 2017-3-9 18:34 | 只看該作者
angmall 發(fā)表于 2017-3-9 18:24
unchar temp;
改成 uchar temp;

謝謝大神解決問題
回復(fù)

使用道具 舉報(bào)

6#
ID:169445 發(fā)表于 2017-3-9 18:50 | 只看該作者
改完之后還是有1_1.C(5): error C129: missing ';' before 'temp'
回復(fù)

使用道具 舉報(bào)

7#
ID:151348 發(fā)表于 2017-3-9 19:33 | 只看該作者
zzqdsgha 發(fā)表于 2017-3-9 18:50
改完之后還是有1_1.C(5): error C129: missing ';' before 'temp'

試試這個(gè)
#include<reg52.h>
#include<intrins.h>
#define uint unsigned int
#define uchar unsigned char
uchar temp;
void delay(uint);
void main()
{
        temp=0xfe;
        P1=temp;
        while(1)
        {
                temp=_crol_(temp,1);
            delay(600);
                P1=temp;        
        }
}

void delay(uint z)
{
        uint x;
        uchar y;
        for(x=z;x>0;x--)
                for(y=20;y>0;y--);        
}
回復(fù)

使用道具 舉報(bào)

8#
ID:169445 發(fā)表于 2017-3-9 20:46 | 只看該作者
imxuheng 發(fā)表于 2017-3-9 19:33
試試這個(gè)
#include
#include

這下終于對了 謝謝謝謝
回復(fù)

使用道具 舉報(bào)

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表