问题
Environment : Visual Studio 2008 Professional Edition
Could Anyone suggest how to fix this errors? I am trying to build program of hexadecimal to decimal conversion but gets some error cases like,
1] C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\malloc.h(198) : error C2065: '_ALLOCA_S_MARKER_SIZE' : undeclared identifier
2] C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\malloc.h(208) : error C2065: '_ALLOCA_S_MARKER_SIZE' : undeclared identifier
3] C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\malloc.h(243) : error C2065: '_ALLOCA_S_MARKER_SIZE' : undeclared identifier
Also i want to ask is it the error of Visual Studio version?
I already done that much
1] Added path of Include folder : C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include
2] I created a project with Application Type = Console Application | Additional optional = Empty project | Finished
3] Also build this code : error C2144: syntax error : 'void' should be preceded by ';'
#include <iostream>
#include <string>
using namespace std;
int main()
{
string hex_string = "1F1FA2";
int number =0;
number = stoi(hex_string, 0, 16);
cout<<"hex_string: "<<hex_string<<endl;
cout<<"number: "<<number<<endl;
hex_string = "12345";
number = stoi(hex_string, 0, 16);
cout<<"hex_string: "<<hex_string<<endl;
cout<<"number: "<<number<<endl;
return 0;
}
I expected output as like ,
hex_string: 1F1FA2
number: 2039714
hex_string: 12345
number: 74565, But getting multiple error
来源:https://stackoverflow.com/questions/58497120/malloc-h198-error-c2065-alloca-s-marker-size-undeclared-identifier