# Error in changing of root version from 6 to 5

**URL:** <https://root-forum.cern.ch/t/error-in-changing-of-root-version-from-6-to-5/41009>\
**Category:** Newbie\
**Created:** [August 16, 2020, 5:28am UTC](https://root-forum.cern.ch/t/error-in-changing-of-root-version-from-6-to-5/41009 "2020-08-16T05:28:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.sadegh](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/m.sadegh/32/23104_2.png) [@m.sadegh](https://root-forum.cern.ch/u/m.sadegh)\
**Post date:** [August 16, 2020, 5:28am UTC](https://root-forum.cern.ch/t/error-in-changing-of-root-version-from-6-to-5/41009/1 "2020-08-16T05:28:11Z")

</div>

Dear All,  
I’m beginner in root.  
I had written a c++ code to our analysis using root-6-18-04. Everything works well. For some special reasons, I force to change root version to 5-34-3. When I try to run again my code, it gives following error

Error: Can’t call basic\_ifstream\<char,char\_traits \>::basic\_ifstream\<char,char\_traits \>(filename) in current scope ttww\_model\_analysis\_3lepton\_same\_sign\_fitting. **C:990:**  
Possible candidates are…  
public: basic\_ifstream\<char,char\_traits \> basic\_ifstream\<char,char\_traits \>::basic\_ifstream\<char,char\_traits \>(void);  
public: basic\_ifstream\<char,char\_traits \> basic\_ifstream\<char,char\_traits \>::basic\_ifstream\<char,char\_traits \>(const char\* s,ios\_base::openmode mode=ios\_base::in);  
\*\*\* Interpreter error recovered \*\*\*

It should be mentioned here, in a part of our code, i use ifstream function to read a piece of text file. Also below line gives above error.  
that part including ifstream is as follows  
**string filename="/data/ttwwmodel/ttww\_yt\_reweighting\_original.lhe";**

**ifstream myfile (filename);**

Would you please clearly help me to solve this problem?

Bests,

Mahdi

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [August 17, 2020, 10:42pm UTC](https://root-forum.cern.ch/t/error-in-changing-of-root-version-from-6-to-5/41009/2 "2020-08-17T22:42:40Z")

</div>

You can try to compile the code with ACLiC.

---

<div class="post-metadata">

**Author:** ![m.sadegh](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/m.sadegh/32/23104_2.png) [@m.sadegh](https://root-forum.cern.ch/u/m.sadegh)\
**Post date:** [August 18, 2020, 6:14am UTC](https://root-forum.cern.ch/t/error-in-changing-of-root-version-from-6-to-5/41009/3 "2020-08-18T06:14:37Z")

</div>

Thanks a lot for you answer. But as I already told, I’m beginner in root and c++.  
Would you please write linux commands that are needed to compile my code by ACLiC?  
Should I install this compiler separately?

All the Bests,

Mahdi

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [August 19, 2020, 7:53pm UTC](https://root-forum.cern.ch/t/error-in-changing-of-root-version-from-6-to-5/41009/4 "2020-08-19T19:53:07Z")

</div>

What is the set of commands that leads to the error you mentioned?

To use ACLiC, if you are doing

```auto
root [] .L myscript.C

```

do

```auto
root [] .L myscript.C+

```

---

<div class="post-metadata">

**Author:** ![m.sadegh](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/m.sadegh/32/23104_2.png) [@m.sadegh](https://root-forum.cern.ch/u/m.sadegh)\
**Post date:** [August 23, 2020, 8:20am UTC](https://root-forum.cern.ch/t/error-in-changing-of-root-version-from-6-to-5/41009/5 "2020-08-23T08:20:10Z")

</div>

Thanks again.  
But nothing changed.

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [August 24, 2020, 6:22pm UTC](https://root-forum.cern.ch/t/error-in-changing-of-root-version-from-6-to-5/41009/6 "2020-08-24T18:22:22Z")

</div>

The next step is to hide from CINT the offending functions, using

```auto
#ifndef __CINT__

```

Cheers,  
Philippe.
