The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Please use <PRE> tags for code snippets, they improve readability. CP Vanity has been updated to V2.4
You might want to check out this site[Physics engines for dummies] for an easy introduction into the basics of vector algebra used to emulate quasi-physical simulations. You will find that in stead of angles and sinus/cosinus it explains the calculations needed for reflections with the help of vector algebra. Although the code is not C/C++ it should be easy enough to translate the relevant code for your problems.
Strictly speaking, reference counting is a technique for implementing garbage collection.
In practice, term "Garbage Collector" usually implies non-deterministic cleanup and that rules out reference counting. In other words, with (automatic) reference counting there is no garbage to be collected: an object gets released at the moment the last reference to it goes out of scope.
GC is a form of global memory management that keeps track of memory resources and returns freed memory at undefined intervals. For performance reasons, GC often does not immediately return freed memory, but instead just marks it as freed later.
RC is a method to locally ensure that an object is freed as soon as it isn't needed anymore. It determines this by keeping count of the references to the object that have been handed out.
In a way you coud consider RC as a very localized GC. Also, as has been pointed out, RC is often used to implement a GC and find out which memory blocks may be released.
GC has better overall performance, but may lead to heavier use of memory. Using only RC keeps the memory footprint at a minimum, but is somewhat slower.
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Please use <PRE> tags for code snippets, they improve readability. CP Vanity has been updated to V2.3
Unicode is a vast specification covering many things. Encluding serveral representations of some very broad (many natural languages) character sets.
There are also associated encodings for those character sets.
Some encodings have a fixed size and some are variable.
A variable size encoding has some byte sequences which represent specific characters and other byte sequences which are used as flags to indicate that additional bytes are needed to determine the actual character.
A multi-byte character set might either mean a fixed size representation of a character set but normally means a variable sized encoding which started with a single byte for the initial encoding. UTF8 is a variable sized encoding and can thus also be considered a multibyte character set.
For coverage of this specific point see the following
I have to develop an application that captures a portion of the desktop every 30 seconds, after viewing the captured image in the window of application, should find (and then highlight) which regions of the new image have changed compared to the previous image.