Jamesfrank
Jamesfrank

Reputation: 33

How to convert TCHAR to double visual C++

I want to convert tchar* variable to double for my project. How can i do that?

TCHAR *t = _T("1000.99");

Upvotes: 3

Views: 2173

Answers (1)

Deadlock
Deadlock

Reputation: 4519

use _tcstod() to convert TCHAR to double.

TCHAR *t = _T("1000.99");
LPTSTR endPtr;
double dValue = _tcstod(t, &endPtr);

Upvotes: 4

Related Questions