Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99157

No operator >> matches these operands ifstream

$
0
0

I am coding in Visual Studio Code, using C++. I am getting the following error, "no operator >> matches these operands". Can you please tell me what I am doing wrong? (The error is occurring on the line, fin >> N.)

#include <fstream>

int solve() {
    std::ifstream fin;
    fin.open("race3.in");
    int N;
    fin>>N;

    std::ofstream fout;
    fout.open("race3.out");

    fout.close();
    fin.close();
}

Viewing all articles
Browse latest Browse all 99157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>