The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
November 30, 2021, 07:36:32 pm
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  UQM on Gentoo linux amd64
« previous next »
Pages: 1 [2] Print
Author Topic: UQM on Gentoo linux amd64  (Read 5026 times)
kroenecker
Zebranky food
*
Offline Offline

Posts: 1



View Profile
Re: UQM on Gentoo linux amd64
« Reply #15 on: October 20, 2005, 09:49:10 pm »

In this line:
 int * int_ptr2; = (int *)test;

I meant:
 int * int_ptr2 = (int *)test;

My bad.

Also to be a total c++ punk I shouldn't use c style casting:


test = reinterpret_cast<int>(int_ptr);  //(int)int_ptr;
int_ptr2 = reinterpret_cast<int *>(test);  //(int *)test;

Also found a great link for understanding macros:

http://www.cprogramming.com/tutorial/cpreprocessor.html
« Last Edit: October 21, 2005, 09:07:31 am by kroenecker » Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: UQM on Gentoo linux amd64
« Reply #16 on: October 20, 2005, 11:30:28 pm »

This is what I mean yes. Usually when you see this in code, it was just someone taking a shortcut. There is rarely a good reason for this. But when it is wanted, there's intptr_t (and uintptr_t).
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Pages: 1 [2] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!