Home » U++ Library support » U++ Callbacks and Timers » THISBACK and inheritance  
	
		
		
			| Re: THISBACK and inheritance [message #48482 is a reply to message #48481] | 
			Thu, 06 July 2017 22:41    | 
		 
		
			
				
				
				
					
						  
						rafiwui
						 Messages: 105 Registered: June 2017  Location: Stuttgart, Germany
						
					 | 
					Experienced Member  | 
					 | 
		 
		 
	 | 
 
	
		Oblivion wrote on Thu, 06 July 2017 20:25 
 
As far as I can see, you are calling a pure virtual method (or storing its address -which is undefined at that moment) from base constructor. 
Calling a pure virtual method from base constructor is undefined behaviour. (Since at that point the vtable entry for the said method is not yet assigned. It is basically "0" (undefined)). That's why you dont't even get an explicit error message.  
 
  
 
But why is it working for the OnClickButton callbacks in the FnWindow? 
 
 
Oblivion wrote on Thu, 06 July 2017 20:25 
 
Also I see that you use some obscure internal macro(s) explicitly. You dont need them at all.  
 
  
 
What macros do you mean and how can I avoid them? 
 
Thanks, 
Daniel 
		
		
  Greetings 
Daniel
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 16:48:03 CET 2025 
 Total time taken to generate the page: 0.05578 seconds 
 |