https://github.com/root-project/root
Raw File
Tip revision: 87c1d2a0e691781d2ac93a4f05afee1436feaf4a authored by Pere Mato on 09 July 2014, 14:50:16 UTC
Releasing ROOT 5.34/19
Tip revision: 87c1d2a
t1015.cxx
/* -*- C++ -*- */
/*************************************************************************
 * Copyright(c) 1995~2005  Masaharu Goto (root-cint@cern.ch)
 *
 * For the licensing terms see the file COPYING
 *
 ************************************************************************/

#include <stdio.h>

namespace ns {
  class A {
  public:
  };

  class B {
  public:
    void Print(const ns::A* x) { printf("%p\n",x); }
  };
  
}

int main() {
  //ns::A a;
  void *x= 0;
  ns::B b;
  b.Print((const ns::A*)x);
#ifdef __CINT__
  G__calc("b.Print((const ns::A*)x)");
#else
  b.Print((const ns::A*)x);
#endif
  return 0;
}

back to top