How to define and assign values to a string array in .header

[quote=“Pree”]Hello,

What I am trying to do is … When a respective match for a fileName is found, I want to append a dirName to it. And The repective full path then used by fp to Open that file from that path. I don’t want to append dirName to all the files in the vector list.[/quote]

Just as a recommendation …

If you like C-strings so much, you’d better read any book about C-programming language, about memory management, about pointers, about string literals, about C-strings and how they must be programmed in C.

But I would recommend you (as it was already done here) to use either std::string, or TString.
Otherwise - you make the same mistakes again and again in every post and you seem to ignore advices, for example, in your latest code excerpt you have …

const char *dirname = “C:/testFile”;

and several lines later …

strcat(dirname, “/”);
strcat(dirname,hf.fileName[i].c_str());

I’d say, this is the typical example why you should not use C-strings, if you do not understand them (sure, another problem is that CINT does not see an error here).