Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 05-03-08   #1 (permalink)
New to Overclock.net
 
luckii's Avatar
 
intel nvidia

Join Date: Jul 2006
Posts: 904

Rep: 45 luckii is acknowledged by some
Unique Rep: 33
Trader Rating: 3
Default Overloading operators c++

Does anyone know how to overload the equal operator? I'm using a matrix (2d) but can't get my equal operator overloaded. Any help?
__________________
System: luckii.3
CPU
e2180 @ 3.4
Motherboard
GA-935-DS3L
Memory
2x2 XMS2
Graphics Card
eVGA 7900gto
Hard Drive
WD 160 SATA
Power Supply
Antec 500w
CPU cooling
GeminII
OS
XP
Monitor
19" Acer Wd
luckii is offline   Reply With Quote
Old 05-03-08   #2 (permalink)
Kernel Sanders
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 4,894
Blog Entries: 1

Rep: 548 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 326
FAQs Submitted: 6
Trader Rating: 5
Default

It should just be

Code:
int class::operator==(class a, class b)
Where class is the class you're overloading == for

What problem are you having?
__________________
BIG BROTHER
I put on my robe and wizard hat...

IS WATCHING

System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   Reply With Quote
Reply



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



All times are GMT -4. The time now is 12:00 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.11381 seconds with 9 queries