# String as a TCut selection criteria

**URL:** <https://root-forum.cern.ch/t/string-as-a-tcut-selection-criteria/55197>\
**Category:** Newbie\
**Tags:** tree, root\
**Created:** [June 6, 2023, 11:59am UTC](https://root-forum.cern.ch/t/string-as-a-tcut-selection-criteria/55197 "2023-06-06T11:59:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shailesh](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/50afbb/32.png) [@Shailesh](https://root-forum.cern.ch/u/Shailesh)\
**Post date:** [June 6, 2023, 11:59am UTC](https://root-forum.cern.ch/t/string-as-a-tcut-selection-criteria/55197/1 "2023-06-06T11:59:30Z")

</div>

Hi All

I am using root 6.26.04 and I have a question. I am trying to Scan a TTree variable which is of type map\<string, vector \>. But I am not able to print the variables by a condition `Tree->Scan("vector","string=="somestring"")`. It gives me the error

```auto
error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
error: expected ')'
note: to match this '('

```

Can someone please point out what am I doing wrong here?

---

<div class="post-metadata">

**Author:** ![yus](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/9fc348/32.png) [@yus](https://root-forum.cern.ch/u/yus)\
**Post date:** [June 6, 2023, 12:14pm UTC](https://root-forum.cern.ch/t/string-as-a-tcut-selection-criteria/55197/2 "2023-06-06T12:14:36Z")

</div>

Hi,

a wild guess: maybe this will work

```auto
Tree->Scan("vector","string==\"somestring\"")

```

---

<div class="post-metadata">

**Author:** ![Shailesh](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/50afbb/32.png) [@Shailesh](https://root-forum.cern.ch/u/Shailesh)\
**Post date:** [June 6, 2023, 12:59pm UTC](https://root-forum.cern.ch/t/string-as-a-tcut-selection-criteria/55197/3 "2023-06-06T12:59:26Z")

</div>

Oh it did work. Thank You very much. Now, it shows the correct entries without any error.
