https://github.com/root-project/root
Raw File
Tip revision: bf6ca7c31bfd8dc0a8648dddd3ee97b0b4f0b6bf authored by Fons Rademakers on 29 September 2011, 09:49:17 UTC
tag patch release v5-26-00g.
Tip revision: bf6ca7c
t1015.cxx
/* -*- C++ -*- */
/*************************************************************************
 * Copyright(c) 1995~2005  Masaharu Goto (cint@pcroot.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