Account Balance and Bitcoin-QT
If you used some python scripts to generate a new wallet file and want to use it with bitcoind or bitcoin-qt, you will probably need to rescan the whole blockchain via running bitcoind -rescan (it may take much time).

After that you can use bitcoind listaccounts to get balances of all your accounts (or bitcoind getbalance to get the total amount).

Not sure if it answers your question though, since not sure what you mean under 'account' and 'CWallet'.