Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 17th, 2006, 9:02 PM   #11
hervens48
Hobbyist Programmer
 
Join Date: Apr 2006
Location: Montreal, Canada
Posts: 107
Rep Power: 3 hervens48 is on a distinguished road
Send a message via AIM to hervens48 Send a message via MSN to hervens48
Quote:
Originally Posted by jayme
Like this?

#include <iostream>
#include <windows.h>

int main()
{
    int selection;

    std::cout << "Enter website to visit:\n"
              << "1. Google\n"
              << "2. Programming Forums\n";

    std::cin >> selection;

    switch(selection)
    {
        case 1:
            ShellExecute(NULL, "open", "http://www.google.com", NULL, NULL, SW_SHOWNORMAL);
            break;
        case 2:
            ShellExecute(NULL, "open", "http://www.programmingforums.org", NULL, NULL, SW_SHOWNORMAL);
            break;
        default:
            std::cout << "Invalid selection!";
    }
    return 0;
}

Can I know what type of program you are attempting to make? Are you just experimenting with different functions? I just like knowing about things that I'm helping somebody with.

OMG MAN, UR A GENIUS!!!!!!!!!!!
THANK YOU SO MUCH
so very very very much
and it even compiles!!!!!
UR MY HERO
Its the exact thing i was trying to do
exept i wasent sure if u could do such things on c++
like they say, u learn something new everyday.
Thx again man, and to all who tried to help. exept that he gave me a completed code
hervens48 is offline   Reply With Quote
Old May 17th, 2006, 9:13 PM   #12
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
He saved you so much time, you might even spare some to learn to spell 'you' and 'your', like a big boy .
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old May 17th, 2006, 9:29 PM   #13
msk420
Programmer
 
msk420's Avatar
 
Join Date: May 2006
Posts: 85
Rep Power: 3 msk420 is on a distinguished road
Quote:
Originally Posted by hervens48
and it even compiles!!!!!
Is't that what it is supposed to do? run away from from you screaming...
Of course it compiled
__________________
Code Forums
msk420 is offline   Reply With Quote
Old May 18th, 2006, 3:18 AM   #14
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6 bl00dninja is on a distinguished road
is this why you wanted to make the mouse move by itself?


???????????????????????????????????????

so you can click on the console window? try doing that yourself and see what happens.

we "press" enter, we don't "click" it.

do you want the mouse to float over in space and hit the the "enter" key for you?

most people are asking about how to create a power function or something like that, not weird shit like this.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old May 18th, 2006, 6:04 AM   #15
rohan
Newbie
 
rohan's Avatar
 
Join Date: May 2006
Location: Vadodara
Posts: 9
Rep Power: 0 rohan is on a distinguished road
Send a message via Yahoo to rohan
I also had a similar question. How do i access internet resources in C++. For ex. I want it to get all the text on the page: http://www.mysite.com/mypage.php and store it in a string or anything like that.
rohan is offline   Reply With Quote
Old May 18th, 2006, 7:38 AM   #16
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by rohan
I also had a similar question. How do i access internet resources in C++. For ex. I want it to get all the text on the page: http://www.mysite.com/mypage.php and store it in a string or anything like that.
Connect to the site and ask for the page, then filter the information with HTML libraries or you can make some simple one yourself, by just by filtering everything in chevrons. (You might get a mess on some pages, so just use a HTML library.) Connecting to the site can be done by libraries too of course.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old May 18th, 2006, 7:45 AM   #17
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
If you get a chevron that's not a private, but a sergeant, raise an exception.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old May 18th, 2006, 10:20 AM   #18
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by DaWei
If you get a chevron that's not a private, but a sergeant, raise an exception.
Hmm yeah, angle bracket then. :p

I guess that when a you get a private chevron, that you'll have to throw an exception.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old May 18th, 2006, 9:25 PM   #19
gryfang
Programmer
 
gryfang's Avatar
 
Join Date: May 2006
Location: Ohio
Posts: 36
Rep Power: 0 gryfang is on a distinguished road
Send a message via AIM to gryfang
Quote:
Originally Posted by bl00dninja
so you can click on the console window? try doing that yourself and see what happens.

we "press" enter, we don't "click" it..
I still have DOS programs like XTGold where you do move the mouse and click on the text. (I love the inverse of where your mouse position was used as a pointer)
However I do agree that you can't "Click" 5 whenever it's located on the keyboard
__________________
--------------------
LOAD "*" ,8,1

God bless
- Gryfang
gryfang is offline   Reply With Quote
Old May 18th, 2006, 10:22 PM   #20
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Quote:
I still have DOS programs like XTGold
Shoot, I'm 65 and I don't have any of that crap, anymore. You sure do know a lot of languages! We'll be expecting beaucoup contributions.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:15 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC