This is continuation of posts:  http://cppcodereviewers.com/bitwise-operations-part-2-first-trivial-approach/  http://cppcodereviewers.com/bitwise-operations/ Challenge: Decode raw bytes Decode data from raw bytes to some data structure which is easy to use and is resource friendly. You get  n  bytes of data in which in each byte there is  0bFDDDFDDD  where  F  is some flag and  DDD  represents data. Lets assume you get pointer to data… Read More


This is continuation of post: http://cppcodereviewers.com/bitwise-operations/ Continuation of this topic is here: http://cppcodereviewers.com/bitwise-operations-part-3-save-resources/ Challenge: Decode raw bytes Decode data from raw bytes to some data structure which is easy to use and is resource friendly. You get  n  bytes of data in which in each byte there is  0bFDDDFDDD  where  F  is some flag and  DDD  represents data. Lets assume you… Read More


Edit: Thanks to comments of Mateusz and A I have corrected code in this post (copy & paste error) Covariant Return Types is language feature which allows you to change return type of your virtual function to covariant type ie. pointer to derived class instead of pointer to base class – see example below:

Read More