Tags » Cpp

Jan 26: Best from the blogosphere

By Sheryl Smolkin

This week we picked up a series of interesting blogs from both bloggers who have previously appeared in this space and several who are new to us . 355 more words

Blogosphere

Enum in C++

C++11 introduced a much better enumeration. It provides a named scope for its enumerators and is strongly typed:

enum class FileType
{
    Png,
    Jpg,
    Bmp
};

write_file(img_data, "foo", FileType::Jpg);
… 40 more words

Composing Continuations

We’ve seen how to use CPS and how to write new functions which combine other CPS functions. Combining functions by nesting lambdas, while neat, is pretty convoluted and an alternative way is sometimes preferred. 621 more words

Functional Programming

Depending on the Government in Retirement: a Good Option?

English Teacher’s Precarious Situation

I’ve been thinking about the question of when is too late to start saving for retirement as I’ve been writing my book about personal finance for English teachers. 358 more words

Retire

Explaining Child Sexual Exploitation in Cambodia

Within an hour of arriving in Phnom Penh – home to some 2 million people, around 32% of whom are aged 14 and under – I became aware that the country had a major problem with child sexual exploitation. 457 more words

How to use lock_guard in C++

A lock_guard simplifies the usage of mutex in C++. It holds a lock on its mutex from the time it is created to the end of its scope. 43 more words

How to use mutex in C++

Mutex is an entity that can be used to control concurrent access to an object by multiple threads. Usage is pretty simple: thread that accesses the object… 56 more words