Please support our C++ advertiser: Programming Forums
![]() |
•
•
Join Date: Jul 2005
Location: London
Posts: 164
Reputation:
Rep Power: 4
Solved Threads: 5
not my solution. I would have used an addressof() func written like so....
and would have used that.
Kinda a cheat to use the array name to miss the overloaded & operator.
template<typename T>
T* addressof(T& val)
{
return reinterpret_cast<T*>(&const_cast<char&>(reinterpret_cast<const volatile char&>(val)));
}Kinda a cheat to use the array name to miss the overloaded & operator.
•
•
Join Date: Jul 2005
Location: London
Posts: 164
Reputation:
Rep Power: 4
Solved Threads: 5
now how do you simulate sizeof for a singleton? cant put those in arrays, as by definition only 1 will exist.
![]() |
Other Threads in the C++ Forum
- Previous Thread: C++ reading,writing,displaying a file?
- Next Thread: C++ Object Pointers Problem
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode