i compile the project with the mingw and the project is cool compiler . this is a part of my code
#include "astnodecodegenerator.hpp"
#include "utility.hpp"
#include "constants.hpp"
#include <string>
#include <cmath>
#include <sstream>
#include <stack>
. . . .
void AstNodeCodeGenerator::visit(StringConst& str)
{
emit_la("a0", (std::string("str_const") + std::to_string(stringtable().get_idx(str.token.get_val()))).c_str());
}
void AstNodeCodeGenerator::visit(IntConst& int_const)
{
emit_la("a0", (std::string("int_const") + std::to_string(inttable().get_idx(int_const.token.get_val()))).c_str());
}
the error is:
error :'to_string' is not a member of 'std' emit_la<"a0",<std::string(("str_const") + std::to_string(stringtable().get_idx(str.token.get_val()))).c_str());