Hi,

Could someone please advise me on how to get the full path of a file in MS VC++ and Dev C++? And would anyone know how to open in new windows, files of different extensions like .jpg or something like that?

Thanks in advance. :-D

MirroredReality

>>how to get the full path of a file
Promt the user for it.

>>how to open in new windows
Learn win32 api functions, like this tutorialhttp://www.winprog.org/tutorial/. You could also use a language with built-in support for Windows such as CLI and C#

Hi,

Thanks for your reply. But lets say that the user only knows the name of the file and not the path name. In that case, how can I get the path name for the user?

Thanks.

Regards

MirroredReality

That could take a very very long time -- see FindFirstFile() and FindNextFile(). What will you do if there are more than one file with the filename but in different folders ? I posted an example program over in the Code Snippets c++ board awhile back.