[Warning] ‘typedef‘ was ignored in this declaration解决

本文介绍了在C++编程时遇到的‘typedef’被忽略的声明问题,详细解析了原因——在定义结构体时未使用别名。提供了两种解决方案:一是删除‘typedef’,二是确保在结构体后添加别名。通过实例展示了正确使用别名的方法,帮助程序员解决类似问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

首先先展示一下问题是怎么样的:
请添加图片描述出现了’typedef’ was ignored in this declaration的问题

下面提供解决方案及原因

原因:在于使用结构体的时候没有使用别名

解决方案:1. 去掉typedef
2.在结构体后面加上别名
解决后如下图

1.请添加图片描述
2.请添加图片描述
别名直接加上结构体名字即可啦!!

Info: ******************************************************************* Info: Running Quartus Prime Analysis & Synthesis Info: Version 18.1.0 Build 625 09/12/2018 SJ Standard Edition Info: Processing started: Tue Jun 24 13:16:33 2025 Info: Command: quartus_map --read_settings_files=on --write_settings_files=off wash -c wash Warning (18236): Number of processors has not been specified which may cause overloading on shared machines. Set the global assignment NUM_PARALLEL_PROCESSORS in your QSF to an appropriate value for best performance. Info (20030): Parallel compilation is enabled and will use 16 of the 16 processors detected Warning (10463): Verilog HDL Declaration warning at wash.v(17): "enum" is SystemVerilog-2005 keyword Error (10170): Verilog HDL syntax error at wash.v(17) near text: "logic"; expecting ";". Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Intel FPGA Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number. Error (10170): Verilog HDL syntax error at wash.v(25) near text: "}"; expecting ";". Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Intel FPGA Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number. Error (10112): Ignored design unit "washing_machine" at wash.v(1) due to previous errors Info (12021): Found 0 design units, including 0 entities, in source file wash.v Error: Quartus Prime Analysis & Synthesis was unsuccessful. 3 errors, 2 warnings Error: Peak virtual memory: 4711 megabytes Error: Processing ended: Tue Jun 24 13:16:39 2025 Error: Elapsed time: 00:00:06 Error: Total CPU time (on all processors): 00:00:12 Error (293001): Quartus Prime Full Compilation was unsuccessful. 5 errors, 2 warnings
最新发布
06-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值