The #include exists, but I get an error: identifier “cout” is undefined. Why?
You need to specify the std:: namespace: std::cout << …. << std::endl;; Alternatively, you can use a using directive: using std::cout; using std::endl; cout << …. << endl; I should add that you should avoid these using directives in headers, since code including these will also have the symbols brought into the global namespace. Restrict … Read more