Поиск:

Ответ в темуСоздание новой темы Создание опроса
> fstream.h в VC++ NET, куда fstream.h делся? 
:(
    Опции темы
Alastis
  Дата 16.11.2004, 12:45 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 251
Регистрация: 15.11.2004
Где: Казахстан, Астана

Репутация: нет
Всего: 10



Вот значит - проект созданный в VC++ 6, компилирую в VC++ NET, и получаю:
Цитата
fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory


попробовал его найти и не смог... куда же он делся?

Это сообщение отредактировал(а) Alastis - 16.11.2004, 15:00


--------------------
Прости, что я говорю, когда ты меня перебиваешь.
PM MAIL WWW ICQ   Вверх
Goldberg
Дата 16.11.2004, 17:22 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 122
Регистрация: 3.6.2004

Репутация: нет
Всего: нет



The old iostream library was removed beginning in Visual C++ .NET 2003.

The main difference between the Standard C++ Library and previous run-time libraries is in the iostream library. Details of the iostream implementation have changed, and it may be necessary to rewrite parts of your code that use iostream if you want to link with the Standard C++ Library.

You will have to remove any old iostream headers (fstream.h, iomanip.h, ios.h, iostream.h, istream.h, ostream.h, streamb.h, and strstrea.h) you have included in your code and add one or more of the new Standard C++ iostream headers (<fstream>, <iomanip>, <ios>, <iosfwd>, <iostream>, <istream>, <ostream>, <sstream>, <streambuf>, and <strstream>, all without the .h extension).

The following list describes behavior in the new Standard C++ iostream library that differs from behavior in the old iostream library.

In the new Standard C++ iostream library:

open functions do not take a third parameter (the protection parameter).
You cannot create streams from file handles.
With a couple of exceptions, all names in the new Standard C++ Library are in the std namespace. See Using C++ Library Headers for more information.
You cannot open ofstream objects with the ios::out flag alone. The ios::out flag must be combined with another ios enumerator in a logical OR; for example, with ios::in or ios::app.
ios::good no longer returns a nonzero value after reaching the end-of-file because the eofbit state is set.
ios::setf(_IFlags) should not be used with a flag value of ios::dec, ios::oct, or ios::hex unless you know that none of the base flags are currently set. The formatted input/output functions and operators assume that only one base is set. Instead, use ios_base. For example, setf( ios_base::oct, ios_base::basefield ) clears all base information and sets the base to octal.
ios::unsetf returns void instead of the previous value.
istream::get( char& _Rch ) does not assign to Rch if there is an error.
istream::get( char* _Pch, int _Ncount, char _Delim ) is different in three ways:
When nothing is read, failbit is set.
An eos is always stored after characters extracted (this happens regardless of the outcome).
A value of -1 for _Ncount is an error.
istream::seekg with an invalid parameter does not set failbit.
The return type streampos is a class with overloaded operators. In functions that return a streampos value (such as istream::tellg, ostream::tellp, strstreambuf::seekoff, and strstreambuf::seekpos), you should cast the return value to the type required: streamoff, fpos_t, or mbstate_t.
The first function parameter (_Falloc) in strstreambuf::strstreambuf( _Falloc, _Ffree ) takes a size_t argument, not a long.
In addition to the above changes, the following functions, constants, and enumerators that are elements of the old iostream library are not elements of the new iostream library:

attach member function of filebuf, fstream ifstream, and ofstream
fd member function of filebuf, fstream ifstream, and ofstream
filebuf::openprot
filebuf::setmode
ios::bitalloc
ios::nocreate
ios::noreplace
ios::sync_with_stdio
streambuf::out_waiting
streambuf::setbuf (use rdbuf -> pubsetbuf for the same behavior)

--------------------
Вот такая у меня привычка, браться за задание, о выполнение которого я изначально не имею никакого представления.
PM MAIL ICQ   Вверх
Alastis
Дата 17.11.2004, 09:14 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 251
Регистрация: 15.11.2004
Где: Казахстан, Астана

Репутация: нет
Всего: 10



Спасибо, все исправил. Это все в новом MSDN прочитать? у меня, к сожалению, пока только для VS 6 имеется. Чем же, к примеру, ios::nocreate заменяется?


Это сообщение отредактировал(а) Alastis - 17.11.2004, 09:20


--------------------
Прости, что я говорю, когда ты меня перебиваешь.
PM MAIL WWW ICQ   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Visual C++/MFC/WTL | Следующая тема »


 




[ Время генерации скрипта: 0.1609 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.