Другие языки программирования и технологии

Начинаю изучать С, возник вопрос, что за библиотека "stdafx.h", опишите как можно подробнее пожалуйста.

stdafx.h is a file, generated by Microsoft Visual Studio IDE wizards, that describes both standard system and project specific include files that are used frequently but hardly ever change.
Compatible compilers (for example, Visual C++ 6.0 and newer) will precompile this file to reduce overall compile times. Visual C++ will not compile anything before the #include "stdafx.h" in the source file, unless the compile option /Yu'stdafx.h' is unchecked (by default); it assumes all code in the source up to and including that line is already compiled.

If you don't want to use precompiled headers, then there is no point to using a standard include file - this will slow down the build for every file that includes it and cause them to include extra stuff that they do not need. Get rid of it and just include the headers they need.
копипаста. жпг
АТ
Александр Трусов
3 164
Лучший ответ
Денис Самодуров то есть по сути, он только сокращает потребляемые прогой ресурсы? Я не очень силён в английском)
Открыть и посмотреть.. .Не судьба?

// stdafx.h: включаемый файл для стандартных системных включаемых файлов
// или включаемых файлов для конкретного проекта, которые часто используются, но
// не часто изменяются
//

#pragma once

#include "targetver.h"

#include <stdio.h>
#include <tchar.h>

// TODO: Установите здесь ссылки на дополнительные заголовки, требующиеся для программы
Для начала: файлы с расширением h - не библиотеки.
Berkut Kanaev
Berkut Kanaev
56 928
Хэдер класса для генерации текстового словаря брутфорсера с произвольным алфавитом и количеством символов в слове

в настройках проекта внимательнее посмотри на группу опций "Precompiled Headers"
Там stdafx.h можно заменить на любой другой файл.
Более того, это опции можно настраивать отдельно для каждого cpp файла

Похожие вопросы