The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
February 21, 2024, 04:41:19 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  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 5325 times)
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:
« Last Edit: October 21, 2005, 09:07:31 am by kroenecker » Logged
Forum Admin
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).

“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!