Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / C++ [игнор отключен] [закрыт для гостей] / Объсните тупому. //HELP / 8 сообщений из 8, страница 1 из 1
06.11.2003, 19:16
    #32317583
Gerbilin
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Объсните тупому. //HELP
Только начинаю изучение С++, и сталкнулся с проблемой
Почему, когда запускаю Debug, выдаётся сообщение об ошибке?
c:\documents and settings\владимир\мои документы\visual studio projects\new\new.cpp(5): fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory //Line 5.
Код:
//Name
//Отображение на экране слова Name

#include "stdafx.h"
#include <iostream.h>

int _tmain(int argc, _TCHAR* argv[])
{
//Вывод на экран
cout << "Name\n";
return 0;
}

Если это важно у меня Visual Studio.net 2003 Enterprise Architect

Заранее спасибо.

заменяю #include <iostream.h> на #include <iostream> и теперь выдаётся ошибак c:\documents and settings\владимир\мои документы\visual studio projects\new\new.cpp(10): error C2065: 'cout' : undeclared identifier // Line 10

В чём дело?
...
Рейтинг: 0 / 0
06.11.2003, 19:39
    #32317592
Evgenye
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Объсните тупому. //HELP
Следует проверить настройку директорий к include файлам.
...
Рейтинг: 0 / 0
06.11.2003, 19:51
    #32317599
Gerbilin
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Объсните тупому. //HELP
Тупой вопрос: А как это сделать и что именно надо исправить? Если не сложно объясните.
Буду очень благодарен.
...
Рейтинг: 0 / 0
06.11.2003, 21:52
    #32317634
vasyap
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Объсните тупому. //HELP
The Additional Include Directories option (/Idirectory) adds one or more directories to the list of directories searched for include files. Directories are searched only until the specified include file is found. You can use this option with the Ignore Standard Include Paths (/X) option.

In the Project Settings dialog box, use a comma to separate directories to be searched when entering more than one directory. (To find this option in the development environment, click Settings on the Project menu. Then click the C/C++ tab, and click Preprocessor in the Category box.)

On the command line, a space between /I and directory is optional. To search more than one directory, type one /I option for each directory.

The compiler searches for directories in the following order:

Directories containing the source file.


Directories specified with the /I option, in the order that CL encounters them.


Directories specified in the INCLUDE environment variable.
Example
The following command looks for the include files requested by MAIN.C in the following order: first in the directory containing MAIN.C, then in the \INCLUDE directory, then in the \MY\INCLUDE directory, and finally in the directories assigned to the INCLUDE environment variable.

CL /I \INCLUDE /I\MY\INCLUDE MAIN.C
...
Рейтинг: 0 / 0
06.11.2003, 22:53
    #32317655
Gerbilin
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Объсните тупому. //HELP
А я немецкий всю жизнь учил, можно по русски, плиз.
...
Рейтинг: 0 / 0
06.11.2003, 23:58
    #32317677
ixane
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Объсните тупому. //HELP
Там в самой IDE какие-то настройки (в меню поискать), а там вкладка Directories - там надо прописать путь где у тебя include-файлы(Папка INCLUDE), а можно просто скопировать необходимый инклюд в папку проекта и заменить в коде < > на " "
...
Рейтинг: 0 / 0
07.11.2003, 12:04
    #32317808
Объсните тупому. //HELP
std::cout
либо
using namespace std;
...
Рейтинг: 0 / 0
07.11.2003, 15:36
    #32317903
Gerbilin
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Объсните тупому. //HELP
Большое, человеческое спасибо. Поменял cout << "Name\n"; на std::cout << "Name\n"; и #include <iostream.h> на #include <iostream> и всё заработало. Спасибо.
...
Рейтинг: 0 / 0
Форумы / C++ [игнор отключен] [закрыт для гостей] / Объсните тупому. //HELP / 8 сообщений из 8, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]