Mail Archives: djgpp/1996/12/07/06:39:33
From: | "Maan M. Hamze" <mmhamze AT mail DOT utexas DOT edu>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | pointers in Nt09 of EMX port
|
Date: | 7 Dec 1996 10:52:19 GMT
|
Organization: | University of Texas at Austin
|
Lines: | 34
|
Message-ID: | <01bbe42a$5a05a7a0$9d805380@maan-m.-hamze>
|
NNTP-Posting-Host: | slip-21-13.ots.utexas.edu
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I do not know if this is the correct group to ask the question. If not
... oh, well!
Anyway, I am using the Rainer Schnitker's NT package (with rsxide) of the
EMX port of C/C++.
When I declare a pointer and assign a value to it, the compiled program
gives me the wrong result.
For example:
int main(void)
{
int fellow = 1;
int * point;
point = &fellow;
cout << "The address of Fellow is: " << &fellow << " and the address of
*point is: " << point;
return (0);
}
As expected: &fellow should be equal to point.
But when I compile the program and run it using the NT package of the EMX
port I keep on getting the value of 1.
When I type cast these values in cout to unsigned I get the value: 334748.
What am I doing wrong? Is there something peculiar to the package that do
not about?
Thanks for any help,
Maan
--
Maan M. Hamze
mmhamze AT mail DOT utexas DOT edu
http://leb.net/~mmhamze
- Raw text -