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

Go to website in c++

100+
P: 134
how could you make the program go to a website like google.com?
i dont care if it opens it in the default browser or if you have to type it in, just somehow open a webpage.
i tried to make the program create a .URL and the run that w/ System(); but that didnt work.
is there a way to do it (if so, how)

thanks
-nate
Jun 19 '07 #1
Share this Question
Share on Google+
6 Replies


gpraghuram
Expert 100+
P: 1,275
Hi,
Do u want to open the internet explorer window with a specified address from ur c++ program?
If yes the the use system command and pass this argument to it
Expand|Select|Wrap|Line Numbers
  1. system("iexplore www.thescripts.com");
  2.  
This will work for you.
Raghuram
Jun 20 '07 #2

100+
P: 134
Hi,
Do u want to open the internet explorer window with a specified address from ur c++ program?
If yes the the use system command and pass this argument to it
Expand|Select|Wrap|Line Numbers
  1. system("iexplore www.thescripts.com");
  2.  
This will work for you.
Raghuram

i tried that and what i got was a blank cmd window for a split second- then nothing happend. im using windows xp if that makes a difference

thanks

ps "iexplore" is not in my WINDOWS folder.
Jun 20 '07 #3

100+
P: 134
now i did put iexplore in my system directory manually and it works perfect (Thank you very much!) but do most ppl have iexplore in their 'windows' folder? none of my computers do.
Jun 20 '07 #4

weaknessforcats
Expert Mod 5K+
P: 9,197
i tried that and what i got was a blank cmd window for a split second- then nothing happend. im using windows xp if that makes a difference

thanks

ps "iexplore" is not in my WINDOWS folder.
That split-second blank screen was your program executing. Then it shout down and took the ie session with it.

Put a cin.get() in the code to keep wh command window up. Then you shoueol see the ie session take off.

As for your ie not being in a specific place, create a string with the path and use that for the system call.
Jun 20 '07 #5

100+
P: 134
That split-second blank screen was your program executing. Then it shout down and took the ie session with it.

Put a cin.get() in the code to keep wh command window up. Then you shoueol see the ie session take off.

As for your ie not being in a specific place, create a string with the path and use that for the system call.
Thank you very much gpraghuram and weaknessforcats- you helped me a lot.
I got it all worked out. :-)
Jun 21 '07 #6

100+
P: 109
If you want to use the default browser without having to use IE then do this:

Expand|Select|Wrap|Line Numbers
  1. system("start /max /wait http://www.google.com");
Jun 29 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.