# Numeric\_limits class "not declared error

**URL:** <https://forum.codewithmosh.com/t/numeric-limits-class-not-declared-error/28970>\
**Category:** C++\
**Created:** [September 26, 2024, 2:16pm UTC](https://forum.codewithmosh.com/t/numeric-limits-class-not-declared-error/28970 "2024-09-26T14:16:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goldwing\_Pat](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@Goldwing\_Pat](https://forum.codewithmosh.com/u/Goldwing_Pat)\
**Post date:** [September 26, 2024, 2:16pm UTC](https://forum.codewithmosh.com/t/numeric-limits-class-not-declared-error/28970/1 "2024-09-26T14:16:41Z")

</div>

Hi there,

Brand new to C++ and basic experience in programming in C.  
I use Codeblocks with GCC compiler.  
I am trying to use the "numeric\_limits"class as explained in tutorial but I get an error when compiling.

‘numeric\_limits’ was not declared in this scope  
expected primary expression before ‘int’

Can somebody point me in a direction where to look?

---

<div class="post-metadata">

**Author:** ![POMPOMBALLS](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/pompomballs/32/6610_2.png) [@POMPOMBALLS](https://forum.codewithmosh.com/u/POMPOMBALLS)\
**Post date:** [September 28, 2024, 4:06pm UTC](https://forum.codewithmosh.com/t/numeric-limits-class-not-declared-error/28970/2 "2024-09-28T16:06:21Z")

</div>

See this post and my reply in the post:

> [@Ultimate C++ Understanding size\_t](https://forum.codewithmosh.com/t/ultimate-c-understanding-size-t/28280):
>
> This is more a question of curiosity, since these lessons appear to maybe be a little outdated. but what do I do to make this work? it says all my numeric\_limits are incomplete. My follow along:
