Jump to content

  • Log In with Google      Sign In   
  • Create Account


DoctorGlow

Member Since 17 Jan 2010
Online Last Active Today, 06:47 PM
-----

Posts I've Made

In Topic: Need help embedding python script in c++

10 March 2014 - 02:21 PM

Probably not a help with your current problem, but I have used boost python on several occasions embedding in different professional engines and always had good experience. Of course YMMV.


In Topic: Better way to write this code

19 February 2014 - 10:01 PM

HScottH, sorry for down voting you, I meant to up vote you, but my fat fingers pressed in wrong placed.

In Topic: Struct versus class?

23 January 2014 - 02:00 PM

 

 

 

hmm, you consider usage of pointed objects in structs good and fit? It suprrises me to be honest.
If something points out it usualy does need a constructor and destructor, and very pushes towards a class being needed.

 

Are you suggesting that struct can not have constructor and/or destructor?

 

constructor fires at new operator, and cannot be omited in definition (not definitive in cpp in fact) and implement certain inheriting policy. You cannot fake this by a function properly , and even if you attempted to do it, would be just for fun or something? I am not saying you cannot write some initializing function and call it.

 

Did you miss the bit that struct and classes are the same in c++.


In Topic: Struct versus class?

23 January 2014 - 11:55 AM

 

hmm, you consider usage of pointed objects in structs good and fit? It suprrises me to be honest.
If something points out it usualy does need a constructor and destructor, and very pushes towards a class being needed.

 

Are you suggesting that struct can not have constructor and/or destructor?


In Topic: cache friendly lock free concept?

31 October 2013 - 02:22 PM

I mark lockstate as violatile, which ensures it is usable for memory locking in this example.

 

This is wrong assumption. From many links about, I picked one, http://en.wikipedia.org/wiki/Volatile_variable

 

Quote:

Operations on volatile variables are not atomic, nor do they establish a proper happens-before relationship for threading. This is according to the relevant standards (C, C++, POSIX, WIN32),[2] and this is the matter of fact for the vast majority of current implementations. Thus, the usage of volatile keyword as a portable synchronization mechanism is discouraged by many C/C++ groups.[3][4][5]


PARTNERS