Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
newbie: reading a file..how? PLZ HELP
hi i have to read a file(pj.dat)in 3 different ways.
1. file is in the same dir as the exe and i think it will be read by doing this:
2. i have to read the same file as it was in "C:" Drive i.e "C:pj.dat"
for this i think we just supply the path which would look like:
3. reading the same file from any drive letter(or directory structure) input by the user.
I am not sure but i think it should be something like:
char filePath; //max chars of the filepath
printf("Please enter the path:");
i am not sure if these will work. Can anyone make sure and point out my mistakes if i am wrong???
0 · ·