My g++ compiler seems to be misconfigured. It is gcc/g++ 3.3.3 from
Debian and it cannot find simple things, like cout. Example:
/usr/include/c++/3.3/iostream contains:
extern ostream cout;
My test program is:
#include iostream
int main( int argc, char *argv[] )
{
cout
I reproduced your problem with my fully-functioning installation, with
exactly the same error messages and with file containing exactly your
example program.
When I change from iostream to iostream.h, the compilation proceeds
properly yielding a working executable, but with the following warning
On Wed, Aug 17, 2005 at 04:43:05PM +0300, Peter wrote:
My g++ compiler seems to be misconfigured. It is gcc/g++ 3.3.3 from
Debian and it cannot find simple things, like cout. Example:
/usr/include/c++/3.3/iostream contains:
extern ostream cout;
My test program is:
#include
Peter wrote:
My g++ compiler seems to be misconfigured. It is gcc/g++ 3.3.3 from
Debian and it cannot find simple things, like cout. Example:
/usr/include/c++/3.3/iostream contains:
extern ostream cout;
My test program is:
#include iostream
You are using the unsuffixed iostream.
On Wed, 17 Aug 2005, Yedidyah Bar-David wrote:
Any input will be welcome, thanks,
Either add 'using namespace std' or #include the older iostream.h.
I tried both std::cout and #include iostream.h. No go. I just tried to
upgrade the C compiler but I am lost in dependency hell. I will work
On Wed, 17 Aug 2005, Omer Zak wrote:
I reproduced your problem with my fully-functioning installation, with
exactly the same error messages and with file containing exactly your
example program.
When I change from iostream to iostream.h, the compilation proceeds
properly yielding a working
On Wed, 17 Aug 2005, Shachar Shemesh wrote:
You are using the unsuffixed iostream. All unsuffixed standard headers
reside in the std namespace.
Either switch to iostream.h (not recommended), add here a line that says:
using namespace std;
This fixed it!
int main( int argc, char *argv[] )
On Thu, 18 Aug 2005, guy keren wrote:
and this is a very very very very bad habbit. never use 'using namespace'
in new code.
Why is it so bad ? I am giving the compiler hints as to what classes to
look in when it tries to guess what I am doing, no ?
Peter
On Wed, 17 Aug 2005, Peter wrote:
On Thu, 18 Aug 2005, guy keren wrote:
and this is a very very very very bad habbit. never use 'using namespace'
in new code.
Why is it so bad ? I am giving the compiler hints as to what classes to
look in when it tries to guess what I amdoing, no ?