Quantcast
Viewing all articles
Browse latest Browse all 5369

C/C++ • programming tips: somewhat oop data structures, global structs, etc

first of all you can add a pointer function to data structures and make a function that points the function pointer(s) to functions, and you can call them from the data structure ie class->pfunc_print("hello");

you can also use global data structures for global messaging, ie set a global data structure and include api data structures and pass that around functions and in loops

you can also use data structures as a return type for pointer functions, and data structures can be used as arguments in pointer functions ie struct io (*pfunc)(struct io, struct api, int);

hope this helps with kernel and user land development!

Statistics: Posted by applebook — Sun Mar 17, 2024 11:22 pm



Viewing all articles
Browse latest Browse all 5369

Trending Articles