Computing.Net > Forums > Programming > C file opening

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

C file opening

Reply to Message Icon

Name: deian1
Date: April 28, 2004 at 23:42:39 Pacific
OS: -
CPU/Ram: -
Comment:

can i have direct acces on parallel port in a C application which runs in a Windows DOS box(like running under real time dos machine)?
how can i open a file which is in a folder who is found in the same folder where application is,file which i want to open at aplication request ,something like:
printf("enter the file name to open:")
....
the file is in a folder /DIR found in the same folder with the aplication, but in the prompt line i want to enter only the file name. which instructions i must use?



Sponsored Link
Ads by Google

Response Number 1
Name: user20
Date: May 6, 2004 at 22:42:12 Pacific
Reply:

// just trying... learn from deitel book,
// c:how to program

FILE *filePointer;
main()
{ // .....
scanf(str);
filePointer=fopen(fileName,"r")
// r for read ?
return 0;
}


user20


0
Reply to Message Icon

Related Posts

See More


perl i dont know y this d... Perl, Java, etc



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: C file opening

c++ file I/O, open/close file www.computing.net/answers/programming/c-file-io-openclose-file/11306.html

C++ generating numbers www.computing.net/answers/programming/c-generating-numbers/5882.html

Miracle C - file sharing & telnet www.computing.net/answers/programming/miracle-c-file-sharing-amp-telnet/9217.html