Join 2 strings inside 'fopen'?
I cannot find if it is possible to join 2 strings for to use inside in function 'fopen'.
I have one string variable eg. 'char name = filename' with name of file without extension.
I need add extension eg. 'txt' and open 'filename.txt' by function 'fopen'. It is possible this way:
- but it change original variable value from 'filename' to value 'filename.txt'.
But I need to use original variable 'name' with value 'filename' (without extension '.txt') for next functions.
Could you know please, how it is possible to simply join 2 strings for to use them together inside some function?
I tried fopen((name".txt"), "f"); without success.
Thank you for your help.