Форум программистов, компьютерный форум, киберфорум
Visual Basic
Войти
Регистрация
Восстановить пароль
Карта форума Темы раздела Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.80/5: Рейтинг темы: голосов - 5, средняя оценка - 4.80
1 / 1 / 0
Регистрация: 22.04.2009
Сообщений: 125
1

Функции для работы с файлами

26.06.2009, 19:50. Показов 998. Ответов 1
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Я открываю вайл для двоичного чтения
Дальше мне нужно его считывать по байтам в массив и иметь возможность по нему перемещаться.

Пожалуйста подскажите какие функции для этого можно использовать.
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
26.06.2009, 19:50
Ответы с готовыми решениями:

Функции для работы с файлами
Добрый вечер Подскажите функции (если такие существуют) для С++ и С в среде LINUX, которые...

Функции для работы с файлами
Есть на си такая прекрасная функция как fgets(). Мне нужен аналог но со string вместо char. Суть...

Операции и функции для работы с файлами
Помоги пожалуйста, может кто рассказать все о: Reset, AssigneFile, Rewrite, Eof, SetLength,...

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

1
pl
51 / 17 / 6
Регистрация: 18.05.2007
Сообщений: 1,322
26.06.2009, 21:43 2
Open Statement

Enables input/output (I/O) to a file.

Syntax

Open pathname For mode [Access access] [lock] As [#]filenumber [Len=reclength]

The Open statement syntax has these parts:

Part Description
pathname
Required. String expression that specifies a file name — may include directory or folder, and drive.

mode
Required. Keyword specifying the file mode: Append, Binary, Input, Output, or Random. If unspecified, the file is opened for Random access.

access
Optional. Keyword specifying the operations permitted on the open file: Read, Write, or Read Write.

lock Optional.
Keyword specifying the operations restricted on the open file by other processes: Shared, Lock Read, Lock Write, and Lock Read Write.

filenumber
Required. A valid file number in the range 1 to 511, inclusive. Use the FreeFile function to obtain the next available file number.

reclength
Optional. Number less than or equal to 32,767 (bytes). For files opened for random access, this value is the record length. For sequential files, this value is the number of characters buffered.

Remarks

You must open a file before any I/O operation can be performed on it. Open allocates a buffer for I/O to the file and determines the mode of access to use with the buffer.

If the file specified by pathname doesn't exist, it is created when a file is opened for Append, Binary, Output, or Random modes.

If the file is already opened by another process and the specified type of access is not allowed, the Open operation fails and an error occurs.

The Len clause is ignored if mode is Binary.

Important In Binary, Input, and Random modes, you can open a file using a different file number without first closing the file. In Append and Output modes, you must close a file before opening it with a different file number.
0
26.06.2009, 21:43
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
26.06.2009, 21:43
Помогаю со студенческими работами здесь

Разработать программу, содержащую 2 функции для работы с текстовыми файлами
1)Задать имя файла: ввод с клавиатуры; строковая константа в программе. 2)Вариант цепочки...

Укажите функции ввода-вывода для работы с бинарными файлами
Укажите функции ввода-вывода для работы с бинарными файлами

cоставить программу, используя процедуры и функции для работы с файлами
Дан файл вещественных чисел. Найти количество его локальных максимумов.

Есть ли api функции для работы с word'овскими файлами?
Собственно в названании темы все написанно. И еще есть ли высокоуровневые функции для вытаскивания...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru