- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I'm new to this stuff but ...
What could cause "'_wtof': identifier not found" when there is no problem with _wtoi ?
Many thanks
Mike
I'm new to this stuff but ...
What could cause "'_wtof': identifier not found" when there is no problem with _wtoi ?
Many thanks
Mike
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
_wtof is defined in stdlib.h and also in wchar.h just like _wtoi. What Visual Studio version are you using? Can you compile successfully with MSVC compiler? Can you post a sample code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reply. I'm using Visual Studio 2005and I'm building a SmartDevice project (Windows CE). The following is the complete code for a console application demonstrating the problem. As is stands it compiles, but if I uncomment the reference to _wtof it does not.
// wtoftest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include
#include
#include
int _tmain(int argc, _TCHAR* argv[])
{
wchar_t spi[8] = L"3.14159";
wchar_t sint[9] = L"12345678";
double pi;
int i;
//pi = _wtof(spi);
i = _wtoi(sint);
return 0;
}
Many thanks for any insights.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You did not answer whether it compiles with Microsoft compiler?
Also, what version of Intel compiler do you use?
The following code:
Also, what version of Intel compiler do you use?
The following code:
[cpp]#includeCompiles just fine with Intel Compiler 12.0.4.147 (this is the latest version, part of Parallel Composer 2011 Update 4).#include #include int wmain(int argc, wchar_t *argv[]) { wchar_t spi[8] = L"3.14159"; wchar_t sint[9] = L"12345678"; double pi; int i; pi = _wtof(spi); i = _wtoi(sint); return 0; } [/cpp]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My version of C++ according to my Visual Studio About dialog is:
Microsoft Visual C++ 2005 77626-009-0000007-41162
so no, it does not compile with Microsoft C++. However, I have discovered that if I create a simple console application for Win32 the code compiles fine. The problem seems to have something to do with the fact that I am targetting a Smart Device (with Windows CE, not Windows XP).
Many thanks
Mike
Microsoft Visual C++ 2005 77626-009-0000007-41162
so no, it does not compile with Microsoft C++. However, I have discovered that if I create a simple console application for Win32 the code compiles fine. The problem seems to have something to do with the fact that I am targetting a Smart Device (with Windows CE, not Windows XP).
Many thanks
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A quick Google search reveals the following:
There's no such function as _wtof. What you can do is to convert the UNICODE character to ANSI and use atof instead.
Good luck!
There's no such function as _wtof. What you can do is to convert the UNICODE character to ANSI and use atof instead.
Good luck!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page