Basically I am trying to use a bit of DJGPP source code, in a Win32 console application that I am going to compile using Microsoft Visual C 5. (I know I could use DJGPP to compile the application but that wouldn't increase my knowledge, or settle my curiosity) The problem that I am having is that the DJGPP source code calls a function called unconst() and Visual C doesn't have it. I can find no documentation for this function within DJGPP, so I am sutruggling to know what it does. I have gleened after a bit of web ferreting that it cast converts a const variable to a non const variable (I think).
The DJGPP file that I am trying to use is
and the line that is casing the trouble is "optarg = unconst(place, char *);" it is near the end of the file.
My three questions are really:
1) Why is the place variable declared as const in the first place in this file.
2) How can I replace the unconst function in Visual C
3) Why in general would you need to convert a const variable to a non const, surely this is redundant as const signals to the compiler that the variable can be stored in ROM, therefore even if you unconst a variable you won't/shouldn't be able to alter it.
Please keep the answers simple. Cheers.