By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,665 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

OPENING OF .chm or .html file in C?

P: n/a
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

Apr 10 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a

BHARAT MEHTA wrote:
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");

Apr 10 '06 #2

P: n/a
BHARAT MEHTA wrote:
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"?

--
If you're posting through Google read <http://cfaj.freeshell.org/google>
Apr 10 '06 #3

P: n/a
Pedro Graca wrote:
BHARAT MEHTA wrote:
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"?


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/>
Apr 10 '06 #4

P: n/a
[snips]

On Mon, 10 Apr 2006 04:29:01 -0700, Vladimir S. Oka wrote:
Not very topical here...

system("start whateverfile.chm");


Hmm. All I get is:

bash: start: command not found
Apr 11 '06 #5

P: n/a
Kelsey Bjarnason opined:
[snips]

On Mon, 10 Apr 2006 04:29:01 -0700, Vladimir S. Oka wrote:
Not very topical here...

system("start whateverfile.chm");


Hmm. All I get is:

bash: start: command not found


That's because you're not the OP, who's running on Windows.

--
Rule of Feline Frustration:
When your cat has fallen asleep on your lap and looks utterly
content and adorable, you will suddenly have to go to the bathroom.

<http://clc-wiki.net/wiki/Introduction_to_comp.lang.c>

Apr 11 '06 #6

P: n/a

"Vladimir S. Oka" <no****@btopenworld.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...

BHARAT MEHTA wrote:
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");


Not really the correct answer either.
Apr 13 '06 #7

P: n/a

Kelsey Bjarnason wrote:
[snips]

On Mon, 10 Apr 2006 04:29:01 -0700, Vladimir S. Oka wrote:
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.

Apr 13 '06 #8

P: n/a

Barry wrote:
"Vladimir S. Oka" <no****@btopenworld.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...

BHARAT MEHTA wrote:
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");


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.

Apr 13 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.