标题:
哪里错了error C267: 'matrix_showcol': requires ANSI-style prototype
[打印本页]
作者:
莫ikun
时间:
2023-10-15 13:24
标题:
哪里错了error C267: 'matrix_showcol': requires ANSI-style prototype
#include <regx52.h>
#include"matrix.h"
unsigned char code donghua[]=
{
0x18,0x18,0x3D,0x5A,0x98,0x28,0x28,0x28,
0x5A,0x5A,0x3C,0x18,0x18,0x28,0x18,0x08,
0x30,0x18,0x3C,0x1C,0x18,0x18,0x18,0x08,
0x30,0x98,0x7C,0x18,0x18,0x28,0x18,0x08,
0x10,0x18,0x3C,0x3C,0x18,0x28,0x28,0x08,
0x30,0x18,0x3C,0x3C,0x18,0x24,0x24,0x44,
0x30,0x18,0x3C,0x38,0x18,0x28,0x24,0x44,
0x18,0x0C,0x1E,0x1C,0x0C,0x14,0x24,0x44,
0x00,0x30,0x18,0x3C,0x1C,0x38,0x28,0x44,
0x00,0xC0,0x60,0xF0,0xF0,0x30,0x48,0x44,
0x00,0x30,0x18,0x3C,0x1C,0x38,0x28,0x44,
0x18,0x0C,0x1E,0x1C,0x0C,0x14,0x24,0x44,
0x00,0x30,0x18,0x3C,0x1C,0x38,0x28,0x44,
0x00,0xC0,0x60,0xF0,0xF0,0x30,0x48,0x44,
0x00,0x30,0x18,0x3C,0x1C,0x38,0x28,0x44,
0x18,0x0C,0x1E,0x1C,0x0C,0x14,0x24,0x44,
0x00,0x30,0x18,0x3C,0x1C,0x38,0x28,0x44,
0x00,0xC0,0x60,0xF0,0xF0,0x30,0x48,0x44,
0x00,0x30,0x18,0x3C,0x1C,0x38,0x28,0x44,
0x18,0x0C,0x1E,0x1C,0x0C,0x14,0x24,0x44,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
};
int main()
{
unsigned char i,offset,count=0;
void matrix_init();
while(1)
{
for(i=0;i<8;i++)
{
matrix_showcol(i,donghua[i+offset]);
}
count++;
if(count>40)
{
count=0;
offset+=8;
if(offset>160)
{offset=0;}
}
}
main.c(2): warning C318: can't open file 'matrix.h'
main.c(40): warning C206: 'matrix_showcol': missing function-prototype
main.c(40): error C267: 'matrix_showcol': requires ANSI-style prototype
Target not created.
Build Time Elapsed: 00:00:00
作者:
phbmxd
时间:
2023-10-15 15:08
看样子是matrix.h没有加入到项目中
作者:
Hephaestus
时间:
2023-10-15 15:30
问题在第一个错误,后面都是连锁反应,解决了h文件找不到的问题,后面都会迎刃而解。h文件在哪里除了你别人都不可能知道。
作者:
npn
时间:
2023-10-15 18:18
你要将头文件 matrix.h 里的代码贴出来,问题才可以解决。
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1