gpt4 book ai didi

c++ - VS2012 中的 strtof() 在哪里?

转载 作者:行者123 更新时间:2023-11-30 01:48:22 26 4
gpt4 key购买 nike

我根本找不到这个函数在哪个库/头文件中,我看了很多人使用这个函数的例子,但是没有结果......这些是我包含的所有内容:

#include "Console.h"
#include "Direct3D9.h"
#include <string>
#include <cerrno>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <stdio.h>
#include <stdlib.h>

但 strtof 仍然出现,因为“错误 namespace “std”没有成员“strtof””

我正在尝试做的事情:

 flValue = std::strtof( vszArgs.at( 1 ).c_str( ), NULL );
pConVar->Set( flValue );

最佳答案

Visual Studio 2012 未实现 strtof

Link to MSDN bug report其中包括建议的解决方法。

关于c++ - VS2012 中的 strtof() 在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30518299/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com