i want to do that read the following multiple file from argv like that:
ARGV: C:/>x 4 ../datdoc1.txt doc2.txt doc3.txt
but that not fixed with the name and the path, so i wrote this, but doesn't work....
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
char* path=argv[2];
string getcontent;
for(int i=3; i<argc;i++)
{
char* file_name_path= path+"/"+argv[i];
ifstream openfile (file_name_path);
if (openfile.is_open())
{
while (! openfile.eof())
{
openfile>>getcontent;//get a string
opp = newchar[getcontent.size() + 1];//allocate space for string
strcpy(opp, getcontent.c_str());//copy it to the opp char*
{header=add(opp, theList);}//use header to call add struct and put char* opp inside
}
}
}