M
merrittr
I was trying to build a list of input files using users input
ie #>program 1 2 3 4 5 6 7 8 9 10 11 12
in the program I wanted name generated input filenames
char beginning[64]="count",endding[64]=".txt", outf[64]="data";
char cf1[64]=strcat(strcat(beginning,argv[0]),endding);
//sprintf (cf1, "%s%s%s",beginning,argv[0],endding);
ifstream in1 (cf1);
what I get at gcc time:
ptcllocate.cpp:16: error: invalid initializer
as you can see I tried sprintf too (after looking in this group) any
hints
on how I can get this to work?
ie #>program 1 2 3 4 5 6 7 8 9 10 11 12
in the program I wanted name generated input filenames
char beginning[64]="count",endding[64]=".txt", outf[64]="data";
char cf1[64]=strcat(strcat(beginning,argv[0]),endding);
//sprintf (cf1, "%s%s%s",beginning,argv[0],endding);
ifstream in1 (cf1);
what I get at gcc time:
ptcllocate.cpp:16: error: invalid initializer
as you can see I tried sprintf too (after looking in this group) any
hints
on how I can get this to work?