Enums and struct on c#

Interesting that c# has structs, the first time i encountered it was in c++ In this example I will be messing about with the enum, defining directions with Int as values. I am still getting around the enums. I have seen its use in different languages but not really used it. I’ve setup the following…

function pointers

I have been using the javascript to call a function via the attributes like so: This is dooable on cpp too using function pointers, which of course would be more efficient as you wouldn’t need to copy the function over to be called within the other function. Here is the code

Class pointers for c++

Messing about with c++ class pointers I noticed that there are two ways of accessing the class pointer. Using arrow operator or the *dereference. Here is the class and header :

pybind11 cmake and more

for the past few days I’ve re-looked at the c++ project I’ve been working on since January. After failing to build a stepper module from scratch, I’m reverting back to using a mix of cpp and python. I am going to use the pybind11 wrapper to build the relevant py module file so that I…

for loop and pointers c++

I’ve been messing about with the for loop on c++ and its quite interesting that a copy is created for the for loop rather than editing the existing values of an array. Here is my final code example: