Categories
February 2012 S M T W T F S « Nov 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Tags
2d algorithm beta better way blog blogging bsp buffer bunnyblogger C++ client constructor data demo destructor enhancement example exception external for glew glsl intermediate mode lightmap loop objects OpenGL packing performance populate rbsptree sdl separator shortening simple snippet string.join structure throw tree unresolved vbo vertex will it happen wysiwygGitHub Projects
Tag Archives: C++
Why I Prefer Initialization Through Constructors
I always prefer initializing my class through the use of a constructor like this: class Apple { Color color; Taste taste; List<string> countries; public Apple(Color color, Taste taste, List<string> countries) { this.color = color; this.taste = taste; this.countries = countries; … Continue reading
Will the destructor be called?
Here’s a C++ quiz for all of you: somefunc() will be called from a thread. Do you think this destructor will be called?
Idioms
What if Was Would the world be a better place?
Putting a separator between your elements
Often when I’m programming, I’ll need to list a bunch of stuff and put commas between them. Like this: 1,2,3,4,5 Usually, this is what I, and most of my colleagues do: List nums = new List(); for (int i = … Continue reading