<< and >> not working

I don't really know how to explain it, but the compiler somehow don't like it when I use a variable or function with << or >>;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "FileManager.h"


int main() {
	while (true) {
		//std::string tmp = FileManager::readSettings("random");
		std::string test = "test";
		std::cout << test; //this is where the error is (under the <<)
		std::cout << "";
	}

	return 0;
}
 

The same thing goes for ifstream >> x, but I can use getline (ifstream, x).
Do you have #include <string> in FileManager.h ?
did you include string? #include <string> and iostream #include <iostream>
Last edited on
> I don't really know how to explain it,
just copy-paste the error message.
Thanks for the replies!
I just had to restart visual studio and then it worked, weird right?
Topic archived. No new replies allowed.