Can anybody please tell me how I can get the desktop path(environment variable) using C language commands.
Scenario is that I want to save a file on desktop.What I can do is just to give a fixed desktop path and a filename to save the file. But after giving this fixed path ,my code will become rigid and will not work on anyother computer having different desktop path (environment variable). My question is can I make my code generalize which can work on any windows based machine by capturing the environment variable of desktop , using C language?
Regards