# Casting int to LPCWSTR (C++)

**URL:** <https://forum.kirupa.com/t/casting-int-to-lpcwstr-c/221144>\
**Category:** programming\
**Created:** [April 1, 2007, 10:38pm UTC](https://forum.kirupa.com/t/casting-int-to-lpcwstr-c/221144 "2007-04-01T22:38:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Al6200](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Al6200](https://forum.kirupa.com/u/Al6200)\
**Post date:** [April 1, 2007, 10:38pm UTC](https://forum.kirupa.com/t/casting-int-to-lpcwstr-c/221144/1 "2007-04-01T22:38:19Z")

</div>

If I have:

int a = 10;  
(LPCWSTR)a

I get nothing. How do I properly convert the types. The reason is that I want to display an integer in a messagebox.
