# Error when using TProfile::GetBinEntries

**URL:** <https://root-forum.cern.ch/t/error-when-using-tprofile-getbinentries/43811>\
**Category:** Newbie\
**Tags:** root\
**Created:** [March 4, 2021, 12:17am UTC](https://root-forum.cern.ch/t/error-when-using-tprofile-getbinentries/43811 "2021-03-04T00:17:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arwen](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/arwen/32/25092_2.png) [@Arwen](https://root-forum.cern.ch/u/Arwen)\
**Post date:** [March 4, 2021, 12:17am UTC](https://root-forum.cern.ch/t/error-when-using-tprofile-getbinentries/43811/1 "2021-03-04T00:17:51Z")

</div>

I am simply using `GetBinEntries()` method:

```auto
Double_t Entries = h1->GetBinEntries(2);

```

I got an error message:

```auto
error: no member named 'GetBinEntries' in 'TH1D'

```

The histogram `h1` was defined earlier:

```auto
TH1D * h1 = new TH1D ("h1","h1", 71, 13.5, 13000);

```

How should I call TProfile or let root know I need to use Class TProfile in this case?  
Or I understand wrong about this error message.

\_ROOT Version: 6.22/06  
\_Platform: Mac

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [March 4, 2021, 7:07am UTC](https://root-forum.cern.ch/t/error-when-using-tprofile-getbinentries/43811/2 "2021-03-04T07:07:01Z")

</div>

> [@Arwen](#):
>
> `error: no member named 'GetBinEntries' in 'TH1D'`

Search `GetBinEntries` entries in [the reference guide](https://root.cern/doc/master/) (“search box” top right) and you will get the list of classes having this method. TH1D is not one of them.
