|
|
|
|
|
August 9th, 2006, 03:00 PM
|
|
National Security Advisor
|
|
Join Date: Dec 1999
Posts: 8,806
Thanks: 54
Thanked 33 Times in 31 Posts
|
|
Re: OT: Stupid c++
I'm not familiar with "Dev C++" - never even heard of it, sorry.
What response to mice are you getting that you don't want? One thing you can generally do is handle mouse events received by your window, and then just do nothing with them and say you handled it. But that's assuming you have a window procedure. If you're running in an MS-DOS-like Windows console window running as a console app, then I don't think you do control how that window behaves - it's a window from Windohs onto your program's i/o. You might be able to make a Windohs shortcut to your app and play with the shortcut's settings to alter the mouse behavior - I'm not sure how many options you have to do that, though.
What's the mouse doing that you don't want it to?
|
August 9th, 2006, 03:07 PM
|
|
National Security Advisor
|
|
Join Date: Dec 1999
Posts: 8,806
Thanks: 54
Thanked 33 Times in 31 Posts
|
|
Re: OT: Stupid c++
Oh, I just glanced at the code you linked to, and saw this:
Code:
case MOUSE_EVENT:
++MouseEvents;
SetConsoleCursorPosition(hOut,
MouseWhere);
cout << MouseEvents << flush;
break;
Is that in your code? Is that what's doing what you don't like? Looks like it is set to move your cursor wherever the mouse goes. If so, just comment out (or delete) all the lines above, to stop it doing that.
|
August 9th, 2006, 05:25 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Stupid c++
*Whaps forehead* Yeah, it works much better when I describe the problem. Sorry.
Basically, each time I move the mouse...Er, the characters used to flicker. Something I did stopped that, though...Programs is wierd.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|
August 14th, 2006, 08:56 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Stupid c++
How would one convert an int into a std: ring?
Programs for debugging...What can you tell me?
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|
August 15th, 2006, 04:19 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Stupid c++
For that matter, how would one convert a std: ring into an int? Or a float?
Are there any libraries out there for this?
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|
August 15th, 2006, 04:28 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: OT: Stupid c++
http://www.cplusplus.com/ is a decent source of c++ info. Look up atoi. Then recall that string objects have a .c_str() member function that will return a c-style string (null-terminated array of characters).
There is a function to go the other way, but I forget it.
Debugging is related to the compiler you are using. What is your compiler?
|
August 15th, 2006, 04:44 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Stupid c++
Thanks. If all else fails...
Dev c++ - The debug function doesn't seem to work.
Is it possible to use the '>>' operator with an 'ifstream'?
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|
August 15th, 2006, 05:29 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Stupid c++
Can someone give me an example of how to use seekg () and get () to read from a file? I can't seem to get them to work.
(DBPro has sane file inputs and outputs. Why can't c++?)
Never mind. Figured it out.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|
August 15th, 2006, 06:10 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Stupid c++
What, exactly, is ' C:\Programming\Dev-Cpp\Projects\Simple Roguelike\Makefile.win [Build Error] [clean] Error 1 ' and why would it stop the program from compiling?
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|
August 15th, 2006, 12:07 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: OT: Stupid c++
>> and << are operators that are generally valid for streams (cout and cin are actually file streams). You should be able to use >> with ifstream, as per this page (ifstream is derived from istream). That site is a good reference to use.
I have no idea what that error means.
To use a different debugger, you would have to compile with a different compiler. Microsoft's VC++ 7.1 compiler is free to get (the command line version), which you should be able to plug in to DevC++ (if it is worth it's salt).
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|