Hello,
I want to do classic "save as" function, how you know it from all programs, but I have a problem - when I put constant pathname in fopen function , like "file.txt" ,it works. But when I type a variable char[], it does nothing. Then I looked for function and find that pathname argument must be const char. I tried to make it another way - I was thinking about saving still as one name,for example "new.txt" and then rename it. But in function rename IS AGAIN THAT FUCKING CONST ! I tried many other ways,but nothing works - in all functions for working with files is CONST !
So, my question is, how it is done in all that programs? What is the correct way of conversion between const and variable? Is there some macro operator which will extract variable value I set as argument (something like ## but for values not names)? Or how they do that?
Thanks for every reply!