惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
Webroot Blog
Webroot Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
Threat Research - Cisco Blogs
V2EX - 技术
V2EX - 技术
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
Recorded Future
Recorded Future
S
Schneier on Security
I
InfoQ
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The GitHub Blog
The GitHub Blog
S
Security @ Cisco Blogs
O
OpenAI News
W
WeLiveSecurity
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
Simon Willison's Weblog
Simon Willison's Weblog
人人都是产品经理
人人都是产品经理
Cloudbric
Cloudbric
The Last Watchdog
The Last Watchdog
The Hacker News
The Hacker News
Google Online Security Blog
Google Online Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
NISL@THU
NISL@THU
T
Tailwind CSS Blog
V
Visual Studio Blog
PCI Perspectives
PCI Perspectives
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
D
DataBreaches.Net
B
Blog RSS Feed
N
News and Events Feed by Topic
N
News and Events Feed by Topic
H
Heimdal Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
腾讯CDC
Latest news
Latest news
V
Vulnerabilities – Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
WordPress大学
WordPress大学
V
V2EX
aimingoo的专栏
aimingoo的专栏
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Register - Security
The Register - Security
Help Net Security
Help Net Security

博客园 - 刘伟_luvi

C项目错误情况小记 s3c2440设置从nfs或从board启动 Hash Functions for Hash Table Lookup 自写linux下的简单man帮助文件 Linux MAN命令 C数组测试 - 刘伟_luvi - 博客园 在本地计算机无法启动MySQL服务。错误1067:进程意外终止 嵌入式中地址-函数之间的转换 对C语言中结构体的测试分析 悄悄地,你走了 AMBA片上总线 Linux系统环境下的Socket编程详细解析 C语言宏定义技巧(常用宏定义)【转】 s3c2410 MMU详述 可重入函数与不可重入函数(转) 程序的书写规则(程序的编码规范) ARM中C和汇编混合编程及示例 嵌入式系统 Boot Loader 技术内幕(转) 关于Linux系统下网卡手写配置文件的介绍
错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
刘伟_luvi · 2008-10-16 · via 博客园 - 刘伟_luvi

今天用gcc 编译一个文件出现如下错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token

语句都快注释完了,编译还是通不过,最后检查include,才发现,原来是include漏了致命重要的”#“号!!

我写成如下形式了:

           include <stdio.h>

           ......

浪费了两分钟。看来还是那句话,细心写代码更胜于快速写完再调试修改。

如果函数定义时,写成如下形式,也会给出同样的提示:

void printSpace(int n);       //注意这里应该是一个“{”,不小心或者只是习惯性地加一个“;”号

    int i=0;

    ....(你的函数内容)

}

百度了一下,这种错误的提示的提问者还不少,故写出来,以供参考