Kamil Zadora Kamil Zadora - 1 year ago 142
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 Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download