包括在MFC中不起作用的头文件(C2146) [英] Including header file not working in MFC (C2146)

查看:156
本文介绍了包括在MFC中不起作用的头文件(C2146)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MFC中包含头文件时遇到问题。当我有一个简单的C ++项目时,它可以工作,但是当我在我的MFC项目中尝试它时,它不会工作。我尝试运行它时遇到的错误是语法错误:

Hi, I have a problem with including a header file in my MFC. It works when I have a simple C++ project, but not when I'm trying it in my MFC project. The error I get when I try to run it is a syntax error saying:

"(C2146)语法错误:缺少';'之前标识符'rectified_linear'"

"(C2146) syntax error: missing ';' before identifier 'rectified_linear'"

正如我所说,当我尝试在一个简单的C ++项目中运行它时,这个错误不会发生(然后它可以工作)。我是MFC的新手,但如果有人能帮助我,那么我可以包含我的头文件,我会非常感激。

As I said this error does not occur when I am trying to run it in a simple C++ project (then it works). I am new to MFC's, but if anyone could help me so I can include my header-file I would appreciate it very much.

推荐答案


我遇到包含头文件的问题

I have a problem with including a header file

当我有一个简单的C ++项目时,它可以工作,但是当我在我的MFC项目中尝试它时,它不起作用。我尝试运行时遇到的错误是语法错误:

It works when I have a simple C++ project, but not when I'm trying it in my MFC project. The error I get when I try to run it is a syntax error saying:

"(C2146)语法错误:缺少';'在标识符'rectified_linear'之前';'

"(C2146) syntax error: missing ';' before identifier 'rectified_linear'"

显示您在MFC项目中使用的#include语句。 />
复制&粘贴,所以我们看到它们出现的* exact *顺序。



- Wayne

Show the #include statements you're using in the MFC project.
Copy & paste so we see the *exact* order in which they occur.

- Wayne


这篇关于包括在MFC中不起作用的头文件(C2146)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆