[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compile error
From: |
Thomas Maeder |
Subject: |
Re: compile error |
Date: |
Tue, 07 Oct 2008 20:58:28 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
Randy AC7NJ <ac7nj@arrl.net> writes:
> myfirst.c:5: error: 'cout' was not declared in this scope
Good.
> / / myfirst.c --displays a message
If your example is from a textbook, that textbook must be pretty old.
> #include <iostream>
> int main(void)
> {
> cout << "come up and C++ me sometime.";
The name cout isn't declared in the global namespace.
The header <iostream> declares the name cout in the namespace std,
though. E.g.:
std::cout << "come up and C++ me sometime.";
would compile.
- Re: compile error,
Thomas Maeder <=