Good time day!!
I welcome all to a nice wonderful forum.
Code:
int main(int argc, const char **argv, const char **envp)
{
spilna_pamyat s, *Ps=&s;
ZeroMemory(&s, sizeof(s));
char* mas =new char[];
//В цей масив будемо зберігати файл
ifstream fs8("test_file_path.txt");
if (!fs8.is_open()) {
cout << "Не вдалося відкрити" << "test_file_path.txt" << endl;
return 0;
}
ifstream dzherelo ( "test_file_path.txt", ios::in | ios::binary);
ofstream priymach ( "produkt.txt", ios::app | ios::binary);
vstavlyannya(22, 666.66, Sui, priymach);
How to read the file into an array of unknown size, eg
997,7KBu a prototype and later possibly more.
You can expect to hihobayta likely. The key word is unknown.
And under the same file, such test_file_path.txt - it probably bit data items, possibly large amounts
text encoding UTP-8.
in prototype and in the future possibly more.
You can big large, hyhabaytiv likely.
There is a stream, such as a so
[code] ifstream dzherelo ( "test_file_path.txt", ios :: in | ios :: binary);
ofstream priymach ( "produkt.txt", ios :: app | ios :: binary);
[/code]
How do I cope with it? More precisely, I had a whole head burned, and I do not understand razumiyu what to do with the flow dzherelo at all, I just can not imagine.
First, make it somehow to the array? Clearly dynamically allocated array?
Anyway, I know how long I order it?
I really want an explanation, but rather all sorts of code samples, links can even link to a professional code.
I beg you, help please! Waiting for answers!