cplusplus.co.il

Archive for the ‘mechanisms’ Category

Reference to temporary

Posted by: rmn on: 20/09/2009

This article will discuss references to temporary objects - a mechanism with a few subtleties.

Mutable and volatile

Posted by: rmn on: 16/09/2009

I am a little busy nowadays, so excuse me for posting yet another somehow basic article. However, I still retain the hope that some of you are not familiar enough with at least one of these two keywords in C++.

Trigraphs

Posted by: rmn on: 08/09/2009

How would you like the next piece of code?

More on arrays

Posted by: rmn on: 06/09/2009

Let’s have a better look at native arrays.

Nuances of exception rethrow

Posted by: rmn on: 23/08/2009

When you throw an exception, the thrown object is copied to a special location in the memory. Now, suppose you wanted to catch an exception (by reference ofcourse), alter it slightly, and then rethrow it with hope that the same object would be rethrown. The language provides two ways to do just that, which are very different [...]

Passing multi-dimensional arrays

Posted by: rmn on: 18/08/2009

Today, a somewhat basic post. Suppose you have a multi-dimensional array and would like to pass it to a function, but still be able to access it easily (by using row,col tuples for instance): passing the pointer is probably not the right way to go (although you could cast inside, but that’s ugly).

Koenig lookup

Posted by: rmn on: 12/08/2009

What would you expect to happen in the following code?


Follow

Get every new post delivered to your Inbox.

Join 25 other followers