cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/26/11:45:55

From: cavgp AT aol DOT com (CAVGP)
Newsgroups: comp.os.msdos.djgpp
Subject: cout and cin
Lines: 29
NNTP-Posting-Host: ladder05.news.aol.com
X-Admin: news AT aol DOT com
Date: 26 Nov 1999 15:48:45 GMT
Organization: AOL Canada http://www.aol.ca
Message-ID: <19991126104845.16521.00000398@ng-fp1.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello there,

I am new in C++ and tried to compile a simple "hello.cc" using GCC in Delories
DJGPP 2.95.2, and my problems are;

1) invalid operand 'const char[23]' and 'int' to binary operation <<; the
program

     int Add (int x,int y)
     { 
       cout << ("The number entered was" << x << "and" << y << "\n");
       return(x+y);
      }

2)undefined reference to cin 'istream:: operator >> (int&)

     cin >> a;

Are cout and cin still valid using the new GCC from 2.95.2?,, and
Where can I find document that will tell me replacement for cin and cout and
others. My reference book is by Liberty @1997 (GNU win-32 b18 released May 7,
1997) which obviously is an old one.

Anyone? It will be highly appreciated by a novice in C++.

Thanks,


Florencio

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019