LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-07-2003, 06:49 AM   #1
juby
Member
 
Registered: Dec 2002
Location: Bangalore, India
Distribution: Ubuntu 5.*
Posts: 241

Rep: Reputation: 30
Question C++ cout & cin dead ???


Hello there,
I am using gcc 3.2 version on redhat 8, I want to program in c++, but
i find that using cout << & cin >> is deprecated and i have to compile with
-Wno-deprecated to get my programs work.. can any one throw some light on thismatter.. I am a newbie to c++. Does it mean that cout & cin will no longer be used in c++ ?
 
Old 02-07-2003, 07:05 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
it's not deprecated as a concept, unless it's already not the way forward and saviour of programming and i never knew... what i *think* might have changed is the namespace it is in. i believe it was exported by default from std:: but shouldn't be any longer. make sure you are saying "using namespace std;" before using cout / cin or maybe just use the full name "std::cout" rather than just cout. of course i might be talking gibberish. that's been known to happen.
 
Old 02-07-2003, 10:34 AM   #3
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
http://www.linuxquestions.org/questi...threadid=43963
 
Old 02-08-2003, 09:51 AM   #4
JStew
Member
 
Registered: Oct 2002
Location: North Atlanta
Distribution: LFS
Posts: 229

Rep: Reputation: 30
my comment and/or question is along these same lines:

i always include:
#include<iostream.h>

and get a warning. Besides adding the no deprecated flag in the compile instructions, how do i avoid this warning?

I try using just iostream and then i get the warning that cout and cin are undeclared functions.

How do i get rid of the warning? I am using Anjuta IDE and not the cli g++
 
Old 02-08-2003, 10:05 AM   #5
llama_meme
Member
 
Registered: Nov 2001
Location: London, England
Distribution: Gentoo, FreeBSD
Posts: 590

Rep: Reputation: 30
The answer is in the thread moeminhtun linked to.

Alex
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can C++ I/O streams (cin, cout) work with ncurses 5.4? Darwish Programming 8 09-29-2005 04:10 PM
cin.ignore Xiangbuilder Programming 4 10-08-2003 08:57 PM
Squid:2nd Browser access Internet SPEED dead becomes dead slow mwj Linux - Software 1 10-04-2003 02:40 PM
g++ and cin.getline() codeviking Programming 8 07-03-2003 08:42 AM
cin.getline adam_boz Programming 6 10-02-2002 09:57 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration