Hello,
Thouh i am 60 years old i am still a beginner in c++ and i need some directions from more experienced programmers.
The following code successfully reads file clip1.txt.
I want to replace the quoted file "clip1.txt" with an expression or a variable or a pointer as i have a large number of files to be processed. The files will be processed with a loop.
I tried to use an indexed string array clip1[30] (exemple clip[ 0]= "clip1.txt")
but it did not work .
The error code is: No matching function for call to std::basic_ifstream<char, std:; char.......>.
The aim is to avoid rewriting the same piece of code many times.
ifstream file1 ("clip1.txt", ios::in|ios::binary|ios::ate);
if (file1.is_open())
{
size3 = file1.tellg();
memblock1 = new char [size3];
file1.seekg (0, ios::beg);
file1.read (memblock1, size3); //
file1.close(); //
I would appreciate a clue about solving this problem.
thanks
monere