Look at my last post
Code:#include <iostream> #include <iomanip> using std::cout; using std::endl; using std::dec; int main() { int number = 25; int* pNumber = &number; cout << endl << dec << pNumber << endl; return EXIT_SUCCESS; }
Look at my last post
Code:#include <iostream> #include <iomanip> using std::cout; using std::endl; using std::dec; int main() { int number = 25; int* pNumber = &number; cout << endl << dec << pNumber << endl; return EXIT_SUCCESS; }
Last edited by manzoor; 08-25-2008 at 07:18 AM.
Your hard-disk is full?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Oh lol,
Well, one drive is full,
In this case, you can probably overcome the problem by setting the environment veriable temp to something else - I usually set it to x:\temp wher x is some drive that has lots of space. You can either restart your dev environment from a command prompt after "set temp=x:\temp" or configure your system settings (My computer -> Properties -> Advanced -> Environment Variables). You may want to set the environment variable "TMP" as well.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Okay thanks,
One more question to ask, prior to the code
the pNumber should return the address in decimal but it doesnt why ?
That's how pointers are displayed. std::dec probably only applies to how real numeric types are output.the pNumber should return the address in decimal but it doesnt why ?
To display it as an integer (you don't need std::dec), you'll need a cast:
And lastly an observation: you use cout, endl and dec just once, yet went through all the trouble to type the using directives ... for what?Code:reinterpret_cast<int>(pNumber)
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Then cast to size_t?
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.