How do I get my program to open a file on my computer i.e an html file in a browser.
by the way it is windows 98.
How do I get my program to open a file on my computer i.e an html file in a browser.
by the way it is windows 98.
T
system( "iexplore myhtml.html" );
I believe that will work.
Quzah.
Unless you use netscape(or any other broswer), so instead of the iexplorer use the netspace's program(the exe) file!
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
C'mon, read the FAQ
ShellExecute gives you the most flexibility (starts documents as well as files, for example).
So you just use ShellExecute with the html file, and it opens your default browser.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
As I am only just learning 'C' I don't really have a clue about all the more complicated options. All I want is something that does the job but I have tried system(); and I can't get it to work. I always get a message ( Linker error : Undefined symbol _system in module myprogram.c. I have included stdlib.h. Does anyone know why this is.
T
Which compiler are you using (I see you're using win98).
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Get Dev C++, or at least Borland C++, these are the only compilers(on win32) that are really good, for both beginners and advance C programmers.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
I have Borland C++. I have 2 versions 1 allows the system function the other does'nt. The one that does, I can get it to access a .exe file but not a .html file and cant work out why this is
T
i wonder how do you access the exe files... ohh.... let me guess:
system(cool.exe);
come on, you got to be kidding... an html files aren't running through the OS, but the broswer!
Last edited by Devil Panther; 11-08-2001 at 05:58 AM.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
critisism 10 helpful advice 0
thanx for that but how do I get my .html to open.
T
> critisism 10 helpful advice 0
>
> thanx for that but how do I get my .html to open.
Hey, you ungreatful piece of crap, why don't you READ what everyone wrote. EVERY post was helpful. Let me recap this for you:
You: "help!"
Me: "Ok, try 'system()'.
Devil: "Use this slight modification if you're using netscape..."
Salem: "Read the FAQ, ShellExecute is better."
Devil: "Good point".
You: "I'm a n00b. I'm getting errors with 'system()'"
Salem: "What compiler?"
Devil: "Get such and such, it's a good compiler."
You: "I have Borland. I donno how."
Devil: "Um, we already told you: 'system( myexe myargs )'"
You: "Waaaah! No one loves me! I'm a dolt! You all suck!"
Me: "You're a moron. We did help."
See? I can be a critic if needed. We weren't. EVERY post gave you helpful advice. Did we get any thanks? No, just a smart ass. People wonder why we jump on people that ask questions that are in the FAQ; well you, my friend, are a living example of why.
Quzah.
Hope is the first step on the road to disappointment.
wtf was that all about???
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
I thought you could read a HTML file with fscanf.
html file is just a simple text file, isn't it. (Before it gets through the brouser that is)
Read ---- yes
open in a browser with fscanf() ----- No Way man!
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi