Как исправить ошибку с 1010

HerMak

1 / 0 / 1

Регистрация: 26.12.2017

Сообщений: 35

1

05.03.2018, 16:45. Показов 9555. Ответов 5

Метки нет (Все метки)


Студворк — интернет-сервис помощи студентам

Решил попробовать сделать змейку на чистом с++, но тут какая то ошибка, игру разрабатываю в Visual studio 2017 код ошибки С1010
непредвиденный конец файла во время поиска предкомпилированного заголовка. Возможно, вы забыли добавить директиву «#include «stdafx.h»»
Добавлял данную библиотеку-не помогло.

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream>
using namespace std;
const int width = 20;
const int height = 20;
int x, y;
int fruitx, fruity, score;
bool GameOver;
enum eDirection { STOP = 0, LEFT, RIHGT, UP, DOWN };
eDirection dir;
 
void SetUp()
{
    GameOver = false;
    dir = STOP;
    x = width / 2;
    y = height / 2;
    fruitx = rand() % width;
    fruity = rand() % height;
    score = 0;
}
void Draw()
{
    system("cls");
    for (int i = 0; i<width; i++)cout << "#";
    cout << endl;
 
    for (int i = 0; i<height; i++)
    {
        for (int j = 0; j<width; i++)
        {
            if (j == 0 || j == width - 1)
                cout << "#";
            cout << " ";
        }
        cout << endl;
    }
 
    for (int i = 0; i<width ; i++) cout << "#";
    cout << endl;
}
void Input()
{
 
}
void Logic()
{
 
}
int main(int argc, char** argv) {
    SetUp();
    while (!GameOver)
    {
        Draw();
        Input();
        Logic();
    }
    return 0;
}



0



3434 / 2813 / 1249

Регистрация: 29.01.2016

Сообщений: 9,426

05.03.2018, 16:46

2

Цитата
Сообщение от HerMak
Посмотреть сообщение

Добавлял данную библиотеку-не помогло.

Куда добавлял? Как добавлял? В коде ничего такого не наблюдаю. И это не библиотека.



0



1 / 0 / 1

Регистрация: 26.12.2017

Сообщений: 35

05.03.2018, 16:50

 [ТС]

3

Не библиотеку, извиняюсь, а вот такой строчкой
#include «stdafx.h



0



3434 / 2813 / 1249

Регистрация: 29.01.2016

Сообщений: 9,426

05.03.2018, 16:52

4

Цитата
Сообщение от HerMak
Посмотреть сообщение

а вот такой строчкой
#include «stdafx.h

Код со строчкой покажи.



0



HerMak

1 / 0 / 1

Регистрация: 26.12.2017

Сообщений: 35

05.03.2018, 16:52

 [ТС]

5

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include <iostream>
#include "stdafx.h"
using namespace std;
const int width = 20;
const int height = 20;
int x, y;
int fruitx, fruity, score;
bool GameOver;
enum eDirection { STOP = 0, LEFT, RIHGT, UP, DOWN };
eDirection dir;
 
void SetUp()
{
    GameOver = false;
    dir = STOP;
    x = width / 2;
    y = height / 2;
    fruitx = rand() % width;
    fruity = rand() % height;
    score = 0;
}
void Draw()
{
    system("cls");
    for (int i = 0; i<width; i++)cout << "#";
    cout << endl;
 
    for (int i = 0; i<height; i++)
    {
        for (int j = 0; j<width; i++)
        {
            if (j == 0 || j == width - 1)
                cout << "#";
            cout << " ";
        }
        cout << endl;
    }
 
    for (int i = 0; i<width ; i++) cout << "#";
    cout << endl;
}
void Input()
{
 
}
void Logic()
{
 
}
int main(int argc, char** argv) {
    SetUp();
    while (!GameOver)
    {
        Draw();
        Input();
        Logic();
    }
    return 0;
}



0



nd2

3434 / 2813 / 1249

Регистрация: 29.01.2016

Сообщений: 9,426

05.03.2018, 16:55

6

Лучший ответ Сообщение было отмечено HerMak как решение

Решение

Цитата
Сообщение от HerMak
Посмотреть сообщение

C++
1
#include "stdafx.h"

Это выше всех инклудов должно быть.



1



У меня Microsoft Visual C++ 2010. Мне дали код и сказали и скопировать и запустить. Делаю я так: захожу в программу -> создать проект -> Консольное приложение Win32 (как мне объясняли). Копирую код и нажимаю F7 и вот что пишет:

1>------ Построение начато: проект: 234, Конфигурация: Debug Win32 ------
1> stdafx.cpp
1> 234.cpp
1>c:usersсашаdesktop234234234.cpp(1): warning C4627: #include <math.h>: пропущен при поиске использования предкомпилированного заголовка
1> Добавление директивы в "StdAfx.h" или перестройка предкомпилированного заголовка
1>c:usersсашаdesktop234234234.cpp(33): fatal error C1010: непредвиденный конец файла во время поиска предкомпилированного заголовка. Возможно, вы забыли добавить директиву "#include "StdAfx.h"" в источник.
Построение: успешно: 0, с ошибками: 1, без изменений: 0, пропущено: 0

Сам код:

#include <math.h>

const float LEFT = 0, RIGHT = 4, TABUL = 0.1;
float fun1(float farg)
{
    float ftemp = 0;
    int ni;
    for (ni = 1; ni <= 5; ni = ni + 1)
        ftemp = ftemp + sqrt((farg + ni) / ni);
    return ftemp;
}

float fun2(float farg)
{
    float ftemp = log(2 * farg * farg) + 3 * sin(farg);
    return ftemp;
}

void main()
{
    float fx = LEFT;
    float fy;
    while (fx <= RIGHT) {
        if (fx <= 2)
            fy = fun1(fx);
        else
            fy = fun2(fx);
        fx = fx + TABUL;
    }
}

So,
I have to use precompiled headers in my VS 2005 project. Now I have a shared source file that does not have a #include «stdafx.h»… How can I include the shared source file in my project without adding stdafx.h to the top of the source file and without turning off precompiled headers??

Georg Fritzsche's user avatar

asked Oct 14, 2009 at 17:01

Polaris878's user avatar

Polaris878Polaris878

39k38 gold badges113 silver badges146 bronze badges

File properties -> C/C++ -> Precompiled Headers -> Create/Use precompiled headers -> Not using …

answered Oct 14, 2009 at 17:08

Georg Fritzsche's user avatar

Georg FritzscheGeorg Fritzsche

97.2k26 gold badges193 silver badges235 bronze badges

3

Look in the properties (context menu) for that file, in the C/C++ — Precompiled Header section.

Change «Create/Use Precompiled Header» to «Not Using Precompiled Headers».

Note — I just checked this in VC++2003 — the option might have moved in VC++2005 or 2008, but I doubt it. Even if it has moved, though, it shouldn’t be hard to find.

answered Oct 14, 2009 at 17:08

3

You could also use the ‘Force Include’ option: «This option has the same effect as specifying the file with double quotation marks in an #include directive on the first line of every source file specified on the command line, in the CL environment variable, or in a command file.»

Very handy to introduce PreCompiled Headers without changing all the source files…

answered Oct 15, 2009 at 9:16

Xavier Nodet's user avatar

Xavier NodetXavier Nodet

4,9732 gold badges36 silver badges48 bronze badges

Содержание

  1. Fatal Error C1010
  2. Remarks
  3. To turn off precompiled headers
  4. Name already in use
  5. cpp-docs / docs / error-messages / compiler-errors-1 / fatal-error-c1010.md
  6. Неустранимая ошибка C1010
  7. Комментарии
  8. Отключение предкомпилированных заголовков
  9. Visual studio fatal error c1010
  10. Answered by:
  11. Question
  12. Answers
  13. All replies
  14. Visual studio fatal error c1010
  15. Answered by:
  16. Question
  17. Answers
  18. All replies

Fatal Error C1010

unexpected end of file while looking for precompiled header. Did you forget to add ‘#include name‘ to your source?

An include file specified by /Yu isn’t listed in the source file. This option is enabled by default in many Visual Studio C++ project types. The default include file specified by this option is pch.h, or stdafx.h in Visual Studio 2017 and earlier.

In the Visual Studio environment, use one of the following methods to resolve this error:

Make sure you haven’t inadvertently deleted, renamed, or removed the pch.h header file or pch.cpp source file from the current project. (In older projects, these files may be named stdafx.h and stdafx.cpp.)

Make sure the pch.h or stdafx.h header file is included before any other code or preprocessor directives in your source files. (In Visual Studio, this header file is specified by the Precompiled Header File project property.)

You can turn off precompiled header use. If you turn off precompiled headers, it may severely impact build performance.

To turn off precompiled header use in a project, follow these steps:

In the Solution Explorer window, right-click the project name, and then choose Properties to open the project Property Pages dialog.

In the Configuration drop-down, select All Configurations.

Select the Configuration properties > C/C++ > Precompiled Headers property page.

In the property list, select the drop-down for the Precompiled Header property, and then choose Not Using Precompiled Headers. Choose OK to save your changes.

Источник

Name already in use

cpp-docs / docs / error-messages / compiler-errors-1 / fatal-error-c1010.md

  • Go to file T
  • Go to line L
  • Copy path
  • Copy permalink

Copy raw contents

Copy raw contents

Fatal Error C1010

unexpected end of file while looking for precompiled header. Did you forget to add ‘#include name‘ to your source?

An include file specified by /Yu isn’t listed in the source file. This option is enabled by default in many Visual Studio C++ project types. The default include file specified by this option is pch.h, or stdafx.h in Visual Studio 2017 and earlier.

In the Visual Studio environment, use one of the following methods to resolve this error:

Make sure you haven’t inadvertently deleted, renamed, or removed the pch.h header file or pch.cpp source file from the current project. (In older projects, these files may be named stdafx.h and stdafx.cpp.)

Make sure the pch.h or stdafx.h header file is included before any other code or preprocessor directives in your source files. (In Visual Studio, this header file is specified by the Precompiled Header File project property.)

You can turn off precompiled header use. If you turn off precompiled headers, it may severely impact build performance.

To turn off precompiled headers

To turn off precompiled header use in a project, follow these steps:

In the Solution Explorer window, right-click the project name, and then choose Properties to open the project Property Pages dialog.

In the Configuration drop-down, select All Configurations.

Select the Configuration properties > C/C++ > Precompiled Headers property page.

In the property list, select the drop-down for the Precompiled Header property, and then choose Not Using Precompiled Headers. Choose OK to save your changes.

Источник

Неустранимая ошибка C1010

непредвиденный конец файла при поиске предкомпилированного заголовка. Вы забыли добавить имя #include в источник?

Комментарии

Включаемый файл, указанный параметром /Yu , не указан в исходном файле. Этот параметр включен по умолчанию во многих типах проектов Visual Studio C++. Файл включения по умолчанию, заданный этим параметром, — pch.h или stdafx.h в Visual Studio 2017 и более ранних версиях.

В среде Visual Studio используйте один из следующих методов для устранения этой ошибки:

Убедитесь, что вы не случайно удалили, не переименовали или не удалили файл заголовка pch.h или исходный файл pch.cpp из текущего проекта. (В более старых проектах эти файлы могут называться stdafx.h и stdafx.cpp.)

Убедитесь, что файл заголовка pch.h или stdafx.h включен перед любым другим кодом или директивами препроцессора в исходных файлах. (В Visual Studio этот файл заголовка задается свойством проекта предварительно скомпилированного файла заголовка .)

Вы можете отключить использование предкомпилированного заголовка. Отключение предкомпилированных заголовков может серьезно повлиять на производительность сборки.

Отключение предкомпилированных заголовков

Чтобы отключить использование предкомпилированного заголовка в проекте, выполните следующие действия.

В окне Обозреватель решений щелкните правой кнопкой мыши имя проекта и выберите пункт Свойства, чтобы открыть диалоговое окно Страницы свойств проекта.

В раскрывающемся списке Конфигурация выберите Все конфигурации.

Выберите страницу свойств Свойства> конфигурацииC/C++>Предкомпилированные заголовки.

В списке свойств выберите раскрывающийся список для свойства Precompiled Header (Предкомпилированные заголовки ), а затем выберите Не использовать предкомпилированные заголовки. Выберите ОК для сохранения внесенных изменений.

Источник

Visual studio fatal error c1010

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

i included an vb dll into vc++. When i compiled i am getting this error.

fatal error C1010: unexpected end of file while looking for precompiled header directive in the .c file produced from the idl file.

i included comdef.h and header file produced by midl compiler to the source file. i had the dll file in the same directory of vc++ project folder. Any thing need to be set here ?

Answers

Produced from the idl file? Thats not possible.

You defined your project to use precompiled header files. So your c file or cpp files must include the file that is defined for precompilation at the top of it.

Usually #include «stdafx.h» must be placed into your cpp file.

If you want to include the c file created form the idl. You can either include it into obne of your files, or you remove the options to use precompiled headers for this specific source file.

Thank you Mr. Martin,

Now i got after setting the precompiled headers off.

It is in Project-> Settings->C/C++->Category->Precompiled headers->not using precompiled headers. Thanks once again.

Produced from the idl file? Thats not possible.

You defined your project to use precompiled header files. So your c file or cpp files must include the file that is defined for precompilation at the top of it.

Usually #include «stdafx.h» must be placed into your cpp file.

If you want to include the c file created form the idl. You can either include it into obne of your files, or you remove the options to use precompiled headers for this specific source file.

Thank you Mr. Martin,

Now i got after setting the precompiled headers off.

It is in Project-> Settings->C/C++->Category->Precompiled headers->not using precompiled headers. Thanks once again.

Hi, I’m a beginer to VC++. I wrote the following code. When compils it it shows «fatal error C1010: unexpected end of file while looking for precompiled header directive». when I included the stdafx.h it shows 3 erros where as 1 before. I tried all the headerfile setting under project->settings->c/c++,but it doesnot work. I’m using visual studio 6.0. Sir please help me.
Thanks in advance.

int_stdcall WinMain(
HINSTANCE hInstancs,
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow)
<
MessageBox(0,»Hello»,»Hello»,0);
return(0);
>

Источник

Visual studio fatal error c1010

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

i included an vb dll into vc++. When i compiled i am getting this error.

fatal error C1010: unexpected end of file while looking for precompiled header directive in the .c file produced from the idl file.

i included comdef.h and header file produced by midl compiler to the source file. i had the dll file in the same directory of vc++ project folder. Any thing need to be set here ?

Answers

Produced from the idl file? Thats not possible.

You defined your project to use precompiled header files. So your c file or cpp files must include the file that is defined for precompilation at the top of it.

Usually #include «stdafx.h» must be placed into your cpp file.

If you want to include the c file created form the idl. You can either include it into obne of your files, or you remove the options to use precompiled headers for this specific source file.

Thank you Mr. Martin,

Now i got after setting the precompiled headers off.

It is in Project-> Settings->C/C++->Category->Precompiled headers->not using precompiled headers. Thanks once again.

Produced from the idl file? Thats not possible.

You defined your project to use precompiled header files. So your c file or cpp files must include the file that is defined for precompilation at the top of it.

Usually #include «stdafx.h» must be placed into your cpp file.

If you want to include the c file created form the idl. You can either include it into obne of your files, or you remove the options to use precompiled headers for this specific source file.

Thank you Mr. Martin,

Now i got after setting the precompiled headers off.

It is in Project-> Settings->C/C++->Category->Precompiled headers->not using precompiled headers. Thanks once again.

Hi, I’m a beginer to VC++. I wrote the following code. When compils it it shows «fatal error C1010: unexpected end of file while looking for precompiled header directive». when I included the stdafx.h it shows 3 erros where as 1 before. I tried all the headerfile setting under project->settings->c/c++,but it doesnot work. I’m using visual studio 6.0. Sir please help me.
Thanks in advance.

int_stdcall WinMain(
HINSTANCE hInstancs,
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow)
<
MessageBox(0,»Hello»,»Hello»,0);
return(0);
>

Источник

Добавлено 27 марта 2021 в 12:55

В этом разделе мы рассмотрим некоторые из распространенных проблем, с которыми, похоже, начинающие программисты сталкиваются с довольно высокой вероятностью. Это не исчерпывающий список проблем компиляции или запуска программ, а скорее прагматичный список решений самых основных проблем. Если у вас есть предложения по другим вопросам, которые могут быть добавлены в этот список, опубликуйте их в разделе комментариев ниже.

Общие проблемы во время выполнения

Вопрос: При выполнении программы окно консоли мигает, а затем сразу закрывается.


Сначала добавьте или убедитесь, что следующие строки находятся в верхней части вашей программы (пользователи Visual Studio должны убедиться, что эти строки появляются после #include "pch.h" или #include "stdafx.h", если таковые существуют):

#include <iostream>
#include <limits>

Во-вторых, добавьте следующий код в конец функции main() (прямо перед оператором return):

// сбрасываем все флаги ошибок
std::cin.clear();
// игнорируем любые символы во входном буфере, пока не найдем новую строку
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), 'n');
// получаем от пользователя еще один символ
std::cin.get();

Это заставит вашу программу ждать, пока пользователь нажмет любую клавишу, прежде чем продолжить, что даст вам время изучить вывод вашей программы, прежде чем ваша операционная система закроет окно консоли.

Другие решения, такие как обычно предлагаемое system("pause"), могут работать только в определенных операционных системах, и их следует избегать.

Более старые версии Visual Studio могут не приостанавливаться, когда программа запускается в режиме Начать с отладкой (Start With Debugging) (F5). Попробуйте запустить в режиме Начать без отладки (Start Without Debugging) (Ctrl + F5).

Вопрос: Я запустил свою программу, получил окно, но ничего не выводится.


Выполнение может блокировать ваш антивирус. Попробуйте временно отключить его и посмотрите, не в этом ли проблема.

Вопрос: Моя программа компилируется, но работает некорректно. Что не так?


Отладьте ее! Советы по диагностике и отладке программ приведены далее в главе 3.

Общие проблемы времени компиляции

Вопрос: Когда я компилирую свою программу, я получаю ошибку о неразрешенном внешнем символе _main или _WinMain@16


Это означает, что ваш компилятор не может найти вашу функцию main(). А все программы должны включать в себя эту функцию.

Есть несколько вещей, которые нужно проверить:

  1. Содержит ли ваш код функцию с именем main?
  2. Правильно ли написано имя main?
  3. Когда вы компилируете свою программу, видите ли вы, что файл, содержащий функцию main(), компилируется? Если нет, либо переместите функцию main() в другой файл, либо добавьте этот файл в свой проект (для получения дополнительной информации о том, как это сделать, смотрите урок «2.7 – Программы с несколькими файлами кода»).
  4. Вы точно создали консольный проект? Попробуйте создать новый консольный проект.

Вопрос: Я пытаюсь использовать функциональность C++11/14/17/XX, но она не работает.


Если у вас старый компилятор, он может не поддерживать эти более свежие дополнения к языку. В этом случае обновите свой компилятор.

В случае с современными IDE/компиляторами ваш компилятор может по умолчанию использовать более старый стандарт языка. Мы рассмотрим, как изменить стандарт языка в уроке «0.12 – Настройка компилятора: выбор стандарта языка».

Вопрос: При попытке использовать cin, cout или endl компилятор говорит, что cin, cout или endl являются «необъявленными идентификаторами».


Во-первых, убедитесь, что вы включили следующую строку в верхней части файла:

#include <iostream>

Во-вторых, убедитесь, что каждое использование cin, cout и endl имеет префикс «std::«. Например:

std::cout << "Hello world!" << std::endl;

Если это не решит вашу проблему, возможно, ваш компилятор устарел или установка повреждена. Попробуйте переустановить и/или обновить компилятор до последней версии.

Вопрос: При попытке использовать endl для завершения напечатанной строки компилятор говорит, что end1 является «необъявленным идентификатором».


Убедитесь, что вы не перепутали букву l (нижний регистр L) в endl с цифрой 1. endl – это все буквы. Убедитесь, что ваш редактор использует шрифт, который проясняет разницу между строчной буквой L, заглавной i и цифрой 1. Кроме того, во многих шрифтах, не предназначенных для программирования, можно легко перепутать заглавную букву o и цифру ноль.

Вопрос: При компиляции с помощью Microsoft Visual C++ вы получаете фатальную ошибку C1010 с сообщением типа «c:vcprojectstest.cpp(263) :fatal error C1010: unexpected end of file while looking for precompiled header directive» (неожиданный конец файла при поиске директивы предварительно скомпилированного заголовка).


Эта ошибка возникает, когда компилятор Microsoft Visual C++ настроен на использование предварительно скомпилированных заголовков, но один (или несколько) ваших файлов кода C++ не включает #include "stdafx.h" или #include "pch.h" в качестве первой строки кода файла.

Предлагаемое нами решение – отключить предварительно скомпилированные заголовки, как это сделано в уроке «0.7 – Компиляция вашей первой программы».

Если вы хотите, чтобы предварительно скомпилированные заголовки были включены, чтобы решить эту проблему, просто найдите файл(ы), вызывающий ошибку (в приведенной выше ошибке виновником является test.cpp), и добавьте следующую строку в самом верху файла):

#include "pch.h"

В более старых версиях Visual Studio используется stdafx.h вместо pch.h, поэтому, если pch.h не решает проблему, попробуйте stdafx.h.

Обратите внимание, что для программ с несколькими файлами каждый файл кода C++ должен начинаться с этой строки.

Кроме того, вы можете отключить предварительно скомпилированные заголовки.

Вопрос: Visual Studio выдает следующую ошибку: «1MSVCRTD.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function «int __cdecl invoke_main(void)» (?invoke_main@@YAHXZ)» (неразрешенный внешний символ _WinMain@16).


Скорее всего, вы создали не консольное приложение, а графическое приложение Windows. Создайте заново свой проект и убедитесь, что вы создали его как консольный проект Windows (или Win32).

Вопрос: Когда я компилирую свою программу, я получаю предупреждение «Cannot find or open the PDB file» (не могу найти или открыть файл PDB).


Это предупреждение, а не ошибка, поэтому оно не должно повлиять на вашу программу. Однако она раздражает. Чтобы исправить это, перейдите в меню Debug (Отладка) → Options and Settings (Параметры) → Symbols (Символы) и установите флажок Microsoft Symbol Server (Сервер символов Microsoft).

Прочее

Вопрос: У меня есть еще одна проблема, которую я не могу понять. Как я могу быстро получить ответ?


По мере обучения у вас, несомненно, будут возникать вопросы или неожиданные проблемы. Что делать дальше, зависит от вашей проблемы. Но в целом есть несколько вещей, которые вы можете попробовать.

Сначала спросите Google. Найдите хороший способ сформулировать свой вопрос и выполните поиск в Google. Если вы получили сообщение об ошибке, вставьте точное сообщение в Google, используя кавычки. Скорее всего, кто-то уже задавал тот же вопрос, и вы найдете ответ.

Если это не поможет, спросите на сайте вопросов и ответов. Существуют веб-сайты, предназначенные для вопросов и ответов о программировании, например, Stack Overflow. Попробуйте разместить там свой вопрос. Не забудьте подробно описать, в чем заключается ваша проблема, и включить всю необходимую информацию, например, какую ОС и какую IDE вы используете.

Теги

C++ / CppFAQLearnCppДля начинающихОбучениеПрограммирование

Speed up your PC in just a few clicks

  • 1. Download and install ASR Pro
  • 2. Open the application and click on the Scan button
  • 3. Select the files or folders you want to restore and click on the Restore button
  • Download this software now and say goodbye to your computer problems.

    Sometimes your computer may give you a c1010 Visual Studio error message. There can be many reasons for this problem. When someone creates a new project that exists in Visual Studio, they manually create a precompiled header file called pch. added to the project. pre-compiled h2 tags are only compiled if they, and even the files they contain, are new. If you only make changes to the project’s source code, your amplification skips compilation, which usually uses a precompiled header.

    How do I get rid of PCH h in Visual Studio?

    Open your projectThen select “Project” “Application Name > Properties…”. Expand Configuration Properties > > c/c++ Precompiled Headers. Set the Precompiled Header option to Do not use precompiled headers.

    When I compile the following code, I get a compilation error in Visual Studio that I don’t understand.

    #include by standard with namespace;interior()    match interval, find result;   long ChildPID;    field userInput = "empty";    // search string    longString sequence = "PPSh-41 is a Soviet submachine gun designed by Georgy Shpagin as a natural, simplified and cheap PPD-40." ;   anyway (userInput.compare("!wq"));            // Reset variables to reuse them        number of matches = 0;        the search result is -1;        cout << "Please enter one or more search words To (!wq Exit): "; // ask the person to find the string        cin >> user input; // Accept input from male or female        if (userInput.compare("!wq")) // The bank checks the user input to see if there are manyDoes anyone else want to search for the real string                    childPID = fork();           While (childPID == 0)                            and (findResult < longString.length)                                    = findResult longString.find(userInput, findResult + UserInput 1,.length);                    in the case where (findResult < longString.length)                        number of matches++;                                cout << "Definitely there will be " << matchCount << ' instances of " << userInput << in longString." << end;                        different                cout << "childPID ! means 0" << endl;                different            cout << "The user has chosen to exit the program. Quit.<< " endl;     Returns 0;

    error c1010 visual studio

    «wordcount.cpp(57): Fatal error Shocking c1010: Looking for precompiled header at end of file. Forgot to include ‘#include «stdafx.h»‘ in source code?

    Did you forget to add Stdafx H to your source?

    Did you forget to include ‘#include «stdafx»? in your source? The fact that you are getting this type of error means that you are sure about this «Win32 Application Helper» (Visual Studio 2015) or possibly the «Windows Desktop Helper» (Visual Studio 2017).

    I don’t think I need an h2 tag file to run this code. Thanks in advance for your efforts.

    Read More:

    Fatal error C1010: Unexpected end of file found while searching for precompiled headers. Did you «#include», forgot to add stdafx.h to the code?
    Source Error Parsing:
    The above error occurs because compilers mostly look for prefixes.But the compiled sensor header (#include «stdafx.If h default»), the file definitely does not complete properly. Header file «stdafx.h» found in precompiled non-instructions.
    project (because the specific CPP point file uses a precompiled header (/YU) by default, add third-party documents that # contain precompiled «stdafx.h» directives, for this reason the compiler in the CPP file is not found at all until the end)
    My problem when it came up was adding files containing large un tuo des to MFC. Hand. RPC folder. These .h and .cpp computer data files belong to the standard category of Adaptive C++ source code and have a closer relationship to MFC.
    Resolution: A.

    error c1010 visual studio

    1) Solution Explorer, available by right-clicking on the corresponding one. CPP file, «Properties» visitor
    2) on the retrieved page in the configuration properties check PM «C/C++», to «Precompiled Header»
    3) change to the right of the first line of the option «create/use precompiled title» changed from previously «use comsawed header (/w)» to «do not use precompiled header» 4)
    Note: second
    .
    (not recommended)
    About 1) solution, right-click on the project itself, select «Properties»
    2) Go back to C/c++ configuration properties -> -> Change «Use precompiled (/YU)» headers should not apply «very precompiled header»

    Download this software now and say goodbye to your computer problems.

    Oshibka C1010 Vizualnaya Studiya
    Erreur C1010 Studio Visuel
    Error C1010 Estudio Visual
    Fel C1010 Visual Studio
    Fout C1010 Visuele Studio
    Erro C1010 Visual Studio
    Blad C1010 Studio Wizualne
    Errore C1010 Visual Studio
    Fehler C1010 Visual Studio
    오류 C1010 비주얼 스튜디오

    Harrison Crist

    Понравилась статья? Поделить с друзьями:
  • Как исправить ошибку росреестра через суд
  • Как исправить ошибку роблокс студио
  • Как исправить ошибку роблокс не отвечает
  • Как исправить ошибку роблокс краш
  • Как исправить ошибку растение против зомби