|
|
|
 |

August 8th, 2006, 01:31 AM
|
 |
National Security Advisor
|
|
Join Date: Dec 1999
Posts: 8,806
Thanks: 54
Thanked 33 Times in 31 Posts
|
|
Re: OT: Stupid c++
Sounds like your mouse button is getting stuck in a down position, or software (mouse driver, or some program messing with mouse messages in a bad way) is messing up the mouse. Like, saying it has handled the MouseUp message and not passing it on to other software, so other programs don't see the MouseUp event so it's like your mouse button is stuck down.
|

August 8th, 2006, 04:22 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Stupid c++
I think it's my keyboard - Tapping the shift key has helped twice now, so it's probably dying.
The mouse is only about 6+ months old; can't remember when we got the keyboard, but it's outlasted at least two processors, I think.
__________________
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 8th, 2006, 05:44 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Stupid c++
What does 'expected primary-expression before '.' token' mean? I'm trying to make a pointer for a base class equal to one of its derived classes.
Thanks again.
__________________
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 8th, 2006, 05:48 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++
Ah, the joys of dereferencing.
. is used to access members of an object.
-> is used to access members of an object when you have a pointer to that object.
If you have:
object* MyObjectPtr = new object();
then you have to access members via:
MyObjectPtr->member();
Whereas if you have just:
object MyObject;
you use:
MyObject.member();
|

August 8th, 2006, 06:27 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Stupid c++
Erm, the pointer is one of the variables in the base class. I'm restarting the roguelike project, only mucho simpler.
The relavent lines:
Quote:
class GR {
BlankSquare MapBlank; WallSquare MapWall; FloorSquare MapFloor;
};
class MapSquare {
public:
BlankSquare * Type;
};
MapSquare Map [81][41];
Map [t][t2].Type = GR.MapWall;
|
__________________
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 8th, 2006, 07:46 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*
Must remember...A class is *Not* a variable. Must declare class as variable first.
Well, at least I changed the error...Er, never mind. Putting '&' in front of what I wanted to convert fixed it. And now it all works. Or seems to. Can never tell with those programs. *Darting eyes* Sneaky programs.
__________________
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 8th, 2006, 08:35 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: Stupid c++
I'm getting aa '[Linker error] undefined reference to `vtable for Character' '
Ok, so it doesn't like virtual functions without a '{};', even if they are void.
__________________
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.
|
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
|
|
|
|
|