Where is the code that sends generated Bitcoins from mining to the wallet? I was just looking through the Bitcoin code but since I am relatively new to C++ I was wondering, if anybody could tell me where the code responsible for sending coins generated through mining to the wallet is located.

Thanks.
Each new block starts with a "coinbase" transaction, which specifies the generated coins for the block. 

The code at the top of CreateNewBlock in main.cpp adds the coinbase tx to the new block, and later on calls GetBlockValue to determine the number of generated coins. 

The coinbase transaction uses the scriptPubKey parameter of CreateNewBlock to specify the recipient of the generated coins.