Ok, so problem as following: Program will read disk letter from file and the create path to another file depending on that input (e.g. if input is C it shall be C:\\Someplace\\Data\\file.dat and if D - D:\\Someplace\\Data\\file.dat).
How to link this input and constant string being latter adress?
Thanks in advance :)
string input, other = "\\Someplace\\Data\\file.dat", result;
cin >> input;
result = input+other;
for C strings:
1 2 3 4
char *input= newchar[/*here the maximum length for the input string*/], *other="\\Someplace\\Data\\file.dat", *result;
cin >> input;
result = newchar[strlen(input)+strlen(other)];
sprintf(result,"%s%s",input,other);