Running into console output problem

I am creating a class definition file for one of my final projects for the semester, and Visual Studio is complaining about my cout and endl identifiers being undefined. Here is some of what I have in the class definition file:
1
2
3
4
5
6
7
8
#include <iostream>
using namespace std;

//...some code...

cout << "Invalid amount specified." << endl;

//...some more code... 

I can't tell why Visual Studio doesn't like the cout and endl identifiers in this file, but has no problem with them in all of my other files. Any thoughts?
Try to get the smallest possible code that reproduces the problem. As it is, I can see nothing wrong.
I think I solved my problem. I had forgotten to put a ; at the end of the class header. It is always the little things that trip me up...
Topic archived. No new replies allowed.