How can you open a file, and view it, pop it up, using C?

J

jon

I am looking for a way for a user to view the file, my program has just
created, without going to look for it!!
Please help

aspiring programmer
Jon
15
 
B

Ben Pfaff

jon said:
I am looking for a way for a user to view the file, my program has just
created, without going to look for it!!

It sounds like you'd be better off asking in a newsgroup specific
to your operating system or C implementation. Standard C doesn't
give a way to do what you want to do, so you're unlikely to get
good answers here.
 
F

Flash Gordon

Ben said:
It sounds like you'd be better off asking in a newsgroup specific
to your operating system or C implementation. Standard C doesn't
give a way to do what you want to do, so you're unlikely to get
good answers here.

The standard does provide a way. Since the program has just created it
the program can read it and write it to stdout. Of course, this might
not be what the OP meant ;-)
 
S

SM Ryan

# I am looking for a way for a user to view the file, my program has just
# created, without going to look for it!!
# Please help

If your system provides a command line to do it, you can probably use
the system function. For example on MacOSX, I could do
system("open 'path/to/file'");
or
system("open -a TextEdit 'path/to/file'");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,798
Messages
2,569,651
Members
45,385
Latest member
ZapGuardianReviews

Latest Threads

Top