explicit c++ keyword explained

A friend of mine was asking this question so quickly thought of explaining it to other doubtees. 😉 In one sentence, it prevents automagic/implicit conversions. Let me explain with an example… First compile this sample using the explicit keyword, compile again with explicit keyword removed. First time you will get error, second time with the […]
Continue reading…

 

Choosing between a function and a macro definition

This is a common and a funny problem. So what is this all about? Let me put it like this… We have a standard “c” function called _toupper and an equivalent macro is also available called _toupper. So my question is how to call function version of _toupper explicitly, if we write _toupper, macro version  […]
Continue reading…