delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/19/04:17:51

From: Lenny Stendig <lenny AT netvision DOT net DOT il>
Newsgroups: comp.os.msdos.djgpp
Subject: Can't print address using cout
Date: Sun, 18 May 1997 23:05:49 +0300
Organization: Unspecified Organisation
Lines: 24
Message-ID: <337F611D.4FCE@netvision.net.il>
Reply-To: lenny AT netvision DOT net DOT il
NNTP-Posting-Host: slip340.advantis.net.il
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Whenever I try to print an address using cout, the answer is always 1. 
For example:

#include <iostream.h>

int main ()
    {
    cout << "\n\n";
    long int x=1, y=2;
    cout << "\n\n&x:" << &x << "  &y: "<< &y;
    return 0;
    }

Output:

&x: 1  &y: 1

I can get an address to appear by using printf.  Any ideas as to why
cout doesn't work?  (I'm using DJGPP Version 2.01)

Thanks,
Lenny
lenny AT netvision DOT net DOT il

- Raw text -


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