Kamil Zadora Kamil Zadora - 2 months ago 22
C++ Question

LPTSTR to int (c++)

I'm passing some numeric arguments while creating a process (in VC++)

I'm stuck at converting LPTSTR to int.

Thanks in advance.

Answer

A LPTSTR is just a Long Pointer to a char or wide-char string.

Use _ttoi or _tstoi for a character-width-agnostic way of doing the conversion.

Also see