Revision c07b8d969e1511dfa2a72cf8d1d5dac32542da23 authored by Fons Rademakers on 23 July 2010, 21:37:12 UTC, committed by Fons Rademakers on 23 July 2010, 21:37:12 UTC

git-svn-id: http://root.cern.ch/svn/root/tags/v5-26-00c@34586 27541ba8-7e3a-0410-8455-c3a389f83636
2 parent s 0f2e79f + 3902593
Raw File
t1027.h
/* -*- C++ -*- */
/*************************************************************************
 * Copyright(c) 1995~2005  Masaharu Goto (cint@pcroot.cern.ch)
 *
 * For the licensing terms see the file COPYING
 *
 ************************************************************************/

// File t02a.C
//#include "TROOT.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int induce() {
   int *p;
   char line[200];
   sprintf(line,
  "int** R__Event_fTracks1 = (int**)(%ld); *R__Event_fTracks1 = new int(3);",
           &p);
   G__exec_text(line);
   //gROOT->ProcessLine(line); // eventually call G__process_cmd
   return *p;
}

class myclass {
public:
   void run() {
      int a = induce();
      printf("created an int of value %d\n",a);

   }
   operator int() { return induce(); };
   myclass() { } //run(); }
};
back to top