Install this theme
Calling member function on null object in C++

Usually when you call a function on null object, a program crashes. But if it doesn ‘t reference any member variables, the function will be called and the program won’t crash.

Read More



Windows services in C++

Not too long ago I had to write a Windows service in C++. Now, C# has a template for that that one can use and write a service quickly. But C++? Yeah, you have to build that one up from the ground.

Inspired by C# ServiceBase class, I created my own C++ ServiceBase class that helped me quickly write a service that would track users logging on and off the system, as well as locking/unlocking the PC.

Link to GitHub repo


kr-studios:

kr-studios:

The benefit of C++ is that you can fall back to C style coding. i.e. instead of using loops & the new/delete operators, I’m just going to use malloc() & free().

Oh, calloc() is a thing.

realloc() is a thing too.

But that doesn’t mean that you have to use C functions in C++ if you want to allocate memory without calling a constructor. void ::operator new(size_t size) is still a thing, you know.

And C++ has a placement new, which is a great thing for memory pools.


the-analytical-engine:

Lecture 3 - Algorithms & Analysis: Brute Force

Copyright 2013 RMIT - Shane Culpepper


Note to self: Learn to focus on important things.


what-if-i-just-shat-myself:

pool party!!! more like thread pool party haha am i right

I’ll invite you to my memory pool party!


The thing about programming is that no matter what your level of experience might be, an elusive bug can still bring you to your knees in a sobbing fit.
(via thethingaboutprogramming)

YES THIS

(via cjbrowne)

That was fun, Google

That was fun, Google


Application design can repulse developers

Yes, Metro interface and WinRT, I’m talking about you…

Your design made a module I was developing unusable for Metro applications.
Why would you kill ALL IPC methods!? Initially I was using sockets, but you can’t connect to localhost anymore from WinRT, neither can you use named pipes.