# Should i use int32, or i can use int? for crossplatform

**URL:** <https://forums.unrealengine.com/t/should-i-use-int32-or-i-can-use-int-for-crossplatform/313374>\
**Category:** Platform & Builds\
**Tags:** integer, unreal-engine, question\
**Created:** [April 1, 2015, 5:39am UTC](https://forums.unrealengine.com/t/should-i-use-int32-or-i-can-use-int-for-crossplatform/313374 "2015-04-01T05:39:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![newbprofi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@newbprofi](https://forums.unrealengine.com/u/newbprofi)\
**Post date:** [April 1, 2015, 5:39am UTC](https://forums.unrealengine.com/t/should-i-use-int32-or-i-can-use-int-for-crossplatform/313374/1 "2015-04-01T05:39:39Z")

</div>

I know that earlier, C++ type “int” for 64 bit platforms was different for Windows and Linux.  
What about now?  
Should i use only “int32”, “uint32” if i want strict 32 bit int?  
or i can use just “int” “unsigned int”?

For example in C#, type “int” is always 32 bit, can i rely that C++ “int” is always 32 bit for modern compilers?

UE4 uses int32 everywhere, so ofc my preanswer is “yes”, i must use int32 always. But i am so used to “int” ;(

---

<div class="post-metadata">

**Author:** ![newbprofi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@newbprofi](https://forums.unrealengine.com/u/newbprofi)\
**Post date:** [April 1, 2015, 6:26am UTC](https://forums.unrealengine.com/t/should-i-use-int32-or-i-can-use-int-for-crossplatform/313374/2 "2015-04-01T06:26:04Z")

</div>

Ok lets use “int32”, not “int”.

---

<div class="post-metadata">

**Author:** ![anon15805799](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon15805799](https://forums.unrealengine.com/u/anon15805799)\
**Post date:** [July 16, 2020, 1:36pm UTC](https://forums.unrealengine.com/t/should-i-use-int32-or-i-can-use-int-for-crossplatform/313374/3 "2020-07-16T13:36:57Z")

</div>

is this the truth? i hope so

---

<div class="post-metadata">

**Author:** ![Spidermined](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spidermined](https://forums.unrealengine.com/u/Spidermined)\
**Post date:** [July 16, 2020, 2:32pm UTC](https://forums.unrealengine.com/t/should-i-use-int32-or-i-can-use-int-for-crossplatform/313374/4 "2020-07-16T14:32:43Z")

</div>

Check the **Portable C++ code** section of the coding standard for type information.

> **[Coding Standard](https://docs.unrealengine.com/5.3/en-US/epic-cplusplus-coding-standard-for-unreal-engine/)**
>
> Write maintainable code by adhering to established standards and best practices.

> “Use of C++'s int and unsigned int types whose size may vary across platforms is acceptable in code where the integer width is unimportant. Explicitly-sized types must still be used in serialized or replicated formats.”
