TotoTitus wrote:
> Hello everyone, tried searching, but couldn't find anything working.
> I need to convert a regular int (let's say, 65) to its char representation.
> Problem is, i already tried some solutions, but none worked.
> Here's what i tried:
>
>
> int nr=65;
>
> char c=(char)nr;
> //Doesn't work;
> char c=static_cast<char>(nr);
> //Nay, doesn't work either
> Hello everyone, tried searching, but couldn't find anything working.
> I need to convert a regular int (let's say, 65) to its char representation.
> Problem is, i already tried some solutions, but none worked.
> Here's what i tried:
>
>
> int nr=65;
>
> char c=(char)nr;
> //Doesn't work;
> char c=static_cast<char>(nr);
> //Nay, doesn't work either
Define "doesn't work". How does the result differ from your
expectations?
Both lines look OK to me.
--
Igor Tandetnik
--
Igor Tandetnik