Re: Fw: cern-root: Compiling Macro

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Tue, 21 Nov 2006 16:42:37 +0100


Hi Alex,

use (*f)(1,1)=5;

Cheers, Axel.

L. A. Linden Levy wrote:
> Hi ROOTers!
>
> Does anyone know what a call to get one element of a TMatrixD should
> look like when you want to actually compile a root macro.
>
> i.e.
>
> [code]
> #include "TMatrixD.h"
>
> Int_t test()
> {
> TMatrixD * f = new TMatrixD(2,2);
> f(1,1)=5;
> f->Print();
> return 1;
> }
>
> [/code]
>
> Does not compile with:
>
> root[0] .L test.C+
>
> and I get this error:
>
> error: 'f' cannot be used as a function
>
> with root 5.12.00e, but it works when I load it in the cint
> interpreter. Thanks for any information/help.
>
> P.S. I did search the documentation pretty thoroughly but I was unable
> to find anything that worked. Thanks so much.
>
> Alex
>
>
> ------------------------------------------------------------------------
>
> !DSPAM:1000,4563095d54815848610666!
Received on Tue Nov 21 2006 - 16:42:46 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:02 MET