dimanche 14 octobre 2018

Visual Studio not recognizing stod() even with precompiled headers turned off and

Below is a snippet to show the basic structure of my code right now. On that last line, Visual Studio is saying "no instance of overloaded function that matches the argument list". According to the references I can find from VS help, however, this is exactly how the function should be used. I have string and iostream included, and I have precompiled headers turned off, so I'm not sure if the fault for VS not recognizing this function is on me or not.

#include <iostream>
#include <vector>
#include <string>

int main(){
    Stack<double> nums;
    std::string input;
    std::string::size_type index;

    std::cin >> input;
    double num = std::stod(input, index);
}

Aucun commentaire:

Enregistrer un commentaire