[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Operator overloading and adding two arrays using that method
From: |
Cyanide Calcuterm |
Subject: |
Operator overloading and adding two arrays using that method |
Date: |
Tue, 6 Feb 2001 15:25:06 -0800 |
Looking over at a few source code examples on the net and in my textbook I am
baffled why g++ seems so intent on preventing me doing the following:
IntegerSet operator+(const IntergerSet& s1, const IntegerSet& s2)
{
IntegerSet result;
for(int m=0; m<501, m++)
{
result.set[m]=s1.set[m]+s2.set[m];
}
return result;
}
where set is a public function:
float set[501];
I am wondering why in blue blazes it seems to be possible yet I get this error
in g++:
'IntegerSet::operator +(const Integerset &, IntegerSet &)'
must take either zero or one argument
this is with egcs-2.91.66
Is this possible with a work around? I have to use operator overloading to add
two arrays but this seems to not work in the least.
------------------------------------------------------------
Hey you! Claim your FREE anonymous email account:
Click Here -> http://www.anonymous.to
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Operator overloading and adding two arrays using that method,
Cyanide Calcuterm <=