1. <i id='Enm74'><tr id='Enm74'><dt id='Enm74'><q id='Enm74'><span id='Enm74'><b id='Enm74'><form id='Enm74'><ins id='Enm74'></ins><ul id='Enm74'></ul><sub id='Enm74'></sub></form><legend id='Enm74'></legend><bdo id='Enm74'><pre id='Enm74'><center id='Enm74'></center></pre></bdo></b><th id='Enm74'></th></span></q></dt></tr></i><div id='Enm74'><tfoot id='Enm74'></tfoot><dl id='Enm74'><fieldset id='Enm74'></fieldset></dl></div>
  2. <tfoot id='Enm74'></tfoot>

    <legend id='Enm74'><style id='Enm74'><dir id='Enm74'><q id='Enm74'></q></dir></style></legend>

    <small id='Enm74'></small><noframes id='Enm74'>

    • <bdo id='Enm74'></bdo><ul id='Enm74'></ul>

    1. 如何避免预编译头文件

      时间:2023-05-23
      1. <legend id='llJRH'><style id='llJRH'><dir id='llJRH'><q id='llJRH'></q></dir></style></legend>
        • <tfoot id='llJRH'></tfoot>
          <i id='llJRH'><tr id='llJRH'><dt id='llJRH'><q id='llJRH'><span id='llJRH'><b id='llJRH'><form id='llJRH'><ins id='llJRH'></ins><ul id='llJRH'></ul><sub id='llJRH'></sub></form><legend id='llJRH'></legend><bdo id='llJRH'><pre id='llJRH'><center id='llJRH'></center></pre></bdo></b><th id='llJRH'></th></span></q></dt></tr></i><div id='llJRH'><tfoot id='llJRH'></tfoot><dl id='llJRH'><fieldset id='llJRH'></fieldset></dl></div>
            <bdo id='llJRH'></bdo><ul id='llJRH'></ul>

            • <small id='llJRH'></small><noframes id='llJRH'>

                  <tbody id='llJRH'></tbody>

              1. 本文介绍了如何避免预编译头文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                我正在尝试用 C++ 编译一个简单的 VS 程序作为类的分配.我们只包含 并且我不断收到此错误:

                I am trying to compile a simple VS program in C++ as an assignment for class. We only ever include <iostream> and I keep getting this error:

                1>Assignment.cpp(15):致命错误 C1010:在查找预编译头时意外的文件结尾.您是否忘记将 '#include "StdAfx.h"' 添加到您的源代码中?

                1>Assignment.cpp(15): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?

                我的程序真的这么小...

                My program is literally this small...

                #include <iostream>
                using namespace std;
                int main()
                {
                    unsigned int day = 30;
                
                    cout << "My Name is John Doe" << endl;
                    cout << "My Major is CS" << endl;
                    cout << "I was born on day " << day << endl;
                    return 0;
                }
                

                我刚刚安装了 Visual Studio Express 2010.我真的很想启动一个空项目,而不是安装所有这些预定义的文件,我认为这会让它变得更容易,但我在创建项目时从来没有得到这个选项.大家有什么建议吗?

                I just installed Visual Studio Express 2010. Really I would love to start an empty project instead of installing with all these files predefined, I think it would make it a lot easier but I never get that option when creating a project. Anybody have any suggestions?

                推荐答案

                您始终可以在项目设置中禁用预编译头文件.

                You can always disable the use of pre-compiled headers in the project settings.

                VS 2010 的说明(对于其他版本的 VS 应该类似):

                Instructions for VS 2010 (should be similar for other versions of VS):

                选择您的项目,使用Project -> Properties"菜单并转到Configuration Properties -> C/C++ -> Precompiled Headers"部分,然后将Precompiled Header"设置更改为Not Using Precompiled Headers"选项.

                Select your project, use the "Project -> Properties" menu and go to the "Configuration Properties -> C/C++ -> Precompiled Headers" section, then change the "Precompiled Header" setting to "Not Using Precompiled Headers" option.

                <小时>

                如果您只想为简单的 C++ 命令行程序(例如在介绍性 C++ 编程类中开发的程序)设置最小的 Visual Studio 项目,您可以创建一个 空 C++ 项目.

                这篇关于如何避免预编译头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:使用 AVX CPU 指令:没有“/arch:AVX"的性能不佳 下一篇:std::to_string - 多个重载函数的实例与参数列表匹配

                相关文章

                最新文章

                  <legend id='D5XXq'><style id='D5XXq'><dir id='D5XXq'><q id='D5XXq'></q></dir></style></legend>
                1. <tfoot id='D5XXq'></tfoot>
                2. <i id='D5XXq'><tr id='D5XXq'><dt id='D5XXq'><q id='D5XXq'><span id='D5XXq'><b id='D5XXq'><form id='D5XXq'><ins id='D5XXq'></ins><ul id='D5XXq'></ul><sub id='D5XXq'></sub></form><legend id='D5XXq'></legend><bdo id='D5XXq'><pre id='D5XXq'><center id='D5XXq'></center></pre></bdo></b><th id='D5XXq'></th></span></q></dt></tr></i><div id='D5XXq'><tfoot id='D5XXq'></tfoot><dl id='D5XXq'><fieldset id='D5XXq'></fieldset></dl></div>

                  <small id='D5XXq'></small><noframes id='D5XXq'>

                  • <bdo id='D5XXq'></bdo><ul id='D5XXq'></ul>