Using root 3.05/05 on MacOSX 10.2.6 I believe this problem may be solved on other platforms, (see http://root.cern.ch/root/roottalk/roottalk02/0356.html) but how to do it on macOSX? The following macro { gROOT->Reset(); #include "Riostream.h" #include <string> string someInput; cout << "Here is a test" << endl; cin >> someInput; cout << someInput; } produces the error: Error: Symbol i is not defined in current scope FILE:bstring.h LINE:2523 Error: Failed to evaluate i.operatorvoidError: Binary operator oprand missing FILE:bstring.h LINE:2523 when attempting the "cin >> someInput;" if the include is changed #include <string.h> to then the error also changes, to: Error: operator>> not defined for basic_istream<char,char_traits<char> > FILE:/Users/shaun/root/macros/test2.cpp LINE:8 similarly for the following : { gROOT->Reset(); #include "Riostream.h" #include <string> cout << "hello" << endl; string s1("hello 2"); cout << s1 <<endl; } gives: hello Error: operator<< not defined for basic_ostream<char,char_traits<char> > FILE:/Users/shaun/root/macros/test3.cpp LINE:8 *** Interpreter error recovered ***
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET