Re: I create a operator + declared in C# to be used in C++

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Olaf Baeyens (olaf.baeyens_at_skyscan.be)
Date: 12/08/04


Date: Wed, 8 Dec 2004 09:11:45 +0100


> since Test1 and Test2 are not HistogramBuffers but pointers to a
> HistogramBuffer you have to write something like:
>
> Test2 = &((*Test2)+(*Test1));
>
> You dereference both Test2 and Test1, add them together and get the
address
> of the result.
>
> But Iam not sure weather this will work :)
>
It doesn't compile, I also tried many variations with typecasting.
Anyway it looks very ugly if I have to do that this way.

So for the C++ I added a Add()
Like this:
     Test2->Add(Test1);

While in C# I use
     Test2=Test2+Test1;

Thanks for the reply. :-)

-- 
http://www.skyscan.be


Relevant Pages