OPENING OF .chm or .html file in C?

B

BHARAT MEHTA

Hi,
I neeed help from you guys in solving a problem.I have a project where
I need to open a
".chm" or ".html" file through C.Can anyone tell me how to do this in
C? I mean how to run that file through my Turbi C compiler based
program
 
V

Vladimir S. Oka

BHARAT said:
Hi,
I neeed help from you guys in solving a problem.I have a project where
I need to open a
".chm" or ".html" file through C.Can anyone tell me how to do this in
C? I mean how to run that file through my Turbi C compiler based
program

Not very topical here...

system("start whateverfile.chm");
 
P

Pedro Graca

BHARAT said:
I neeed help from you guys in solving a problem.I have a project where
I need to open a
".chm" or ".html" file through C.

fopen() comes to mind.
Can anyone tell me how to do this in
C? I mean how to run that file through my Turbi C compiler based
program

What do you mean "run a file through the compiler based program"?
 
C

CBFalconer

Pedro said:
fopen() comes to mind.


What do you mean "run a file through the compiler based program"?

All C files are fundamentally streams of char. So:

int ch;

while (EOF != (ch = getc(f))) {
/* do unspeakable things with ch */
}

should handle it. This is known as a filter.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
 
P

pinkfog

Kelsey said:
[snips]

Not very topical here...

system("start whateverfile.chm");

Hmm. All I get is:

bash: start: command not found
maybe you can write a batch file:
start *.chm

call the batch file in your prgm using system() function.Hope it can
help.
 
V

Vladimir S. Oka

Barry said:
Not really the correct answer either.

Depends on what the OP really wants, and that wasn't clear at all.

I made a stab at answering what I guessed was the question. <OT>On a
Windows system (from Win95 onwards), the above will "open a [.chm] file
through C" in its default registered application.</OT>

OP is free to provide better explanation, and may then get a
better/different answer.
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top