From: eggbrains AT aol DOT com (Egg brains) Newsgroups: comp.os.msdos.djgpp Subject: & and cout... print's "1"... Date: 13 Oct 1997 22:51:59 GMT Lines: 30 Message-ID: <19971013225101.SAA14664@ladder01.news.aol.com> NNTP-Posting-Host: ladder01.news.aol.com Organization: AOL http://www.aol.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk okay, i hate to ask question in here... (it's only rarely that i can ever answer questions and there fore i feel like someones pulling me around) anyway, i got stuck (for the last 2 days now) when i try: long foo; foo=800; cout << &foo; it only print's "1"... how come? shouldn't it print the referenec of foo? and when i try to put it in a varible first such as long foo; foo=800; long stuck=(long)&foo; cout << stuck; it prints a number other than one, but when i run the program again and again, the number stay's the same. when i swtich around the loading order for the varible the number stays the same as well.. thanx for any help. Paul "DJGGP is cool, but it is _only_ a tool. Nothing more, Nothing less. It's strength comes from _how_ you use it." --Paul Stickney (Me)