Click here to Skip to main content
15,911,030 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to describe such objects using C++? Pin
perlmunger16-Apr-03 7:10
perlmunger16-Apr-03 7:10 
GeneralXOR mode Pin
pankajdaga16-Apr-03 1:21
pankajdaga16-Apr-03 1:21 
GeneralRe: XOR mode Pin
Dominik Reichl16-Apr-03 1:58
Dominik Reichl16-Apr-03 1:58 
GeneralUnicode windows Pin
Hugo Hallman16-Apr-03 1:10
Hugo Hallman16-Apr-03 1:10 
GeneralRe: Unicode windows Pin
Anders Molin16-Apr-03 4:17
professionalAnders Molin16-Apr-03 4:17 
GeneralBest way to completely empty structure.. Pin
IrishSonic16-Apr-03 1:02
IrishSonic16-Apr-03 1:02 
GeneralRe: Best way to completely empty structure.. Pin
Dominik Reichl16-Apr-03 2:03
Dominik Reichl16-Apr-03 2:03 
GeneralRe: Best way to completely empty structure.. Pin
JT Anderson16-Apr-03 6:35
JT Anderson16-Apr-03 6:35 
I use this template class.
<br />
template <class T, int FILL=0> class auto_zap : public T<br />
{<br />
public:<br />
	auto_zap()<br />
	{<br />
		memset(static_cast<T *>(this), FILL, sizeof(T));<br />
	}<br />
<br />
	void zap()<br />
	{<br />
		memset(static_cast<T *>(this), FILL, sizeof(T));<br />
	}<br />
<br />
	auto_zap<T> & operator=(const T &rhs)<br />
	{<br />
		*static_cast<T *>(this) = rhs;<br />
		return *this;<br />
	}<br />
};<br />


--------
There are 10 types of people in this world. Those who know binary and those who don't.
GeneralRe: Best way to completely empty structure.. Pin
Gary R. Wheeler18-Apr-03 5:14
Gary R. Wheeler18-Apr-03 5:14 
GeneralWhich way is better to overload operator >> Pin
George215-Apr-03 23:50
George215-Apr-03 23:50 
GeneralRe: Which way is better to overload operator >> Pin
Joaquín M López Muñoz16-Apr-03 3:34
Joaquín M López Muñoz16-Apr-03 3:34 
GeneralRe: Which way is better to overload operator >> Pin
George216-Apr-03 3:43
George216-Apr-03 3:43 
Generallocale currency Pin
vcseeker15-Apr-03 21:57
vcseeker15-Apr-03 21:57 
GeneralRe: locale currency Pin
David Crow16-Apr-03 2:18
David Crow16-Apr-03 2:18 
GeneralIE toolbar disappearing buttons Pin
xenonii15-Apr-03 20:54
xenonii15-Apr-03 20:54 
GeneralRe: IE toolbar disappearing buttons Pin
xenonii16-Apr-03 2:22
xenonii16-Apr-03 2:22 
GeneralDDI hooking Pin
vikramlinux15-Apr-03 20:21
vikramlinux15-Apr-03 20:21 
GeneralRe: DDI hooking Pin
Dominik Reichl15-Apr-03 23:13
Dominik Reichl15-Apr-03 23:13 
GeneralRe: DDI hooking Pin
vikramlinux15-Apr-03 23:17
vikramlinux15-Apr-03 23:17 
GeneralTwo strange operations with this pointer. Pin
George215-Apr-03 17:18
George215-Apr-03 17:18 
GeneralRe: Two strange operations with this pointer. Pin
Michael Dunn15-Apr-03 19:36
sitebuilderMichael Dunn15-Apr-03 19:36 
GeneralRe: Two strange operations with this pointer. Pin
George215-Apr-03 19:55
George215-Apr-03 19:55 
GeneralRe: Two strange operations with this pointer. Pin
Michael Dunn15-Apr-03 20:10
sitebuilderMichael Dunn15-Apr-03 20:10 
GeneralRe: Two strange operations with this pointer. Pin
George215-Apr-03 20:11
George215-Apr-03 20:11 
QuestionWill this case cause memory leak? Pin
George215-Apr-03 16:15
George215-Apr-03 16:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.