C++ code for traverse though all the blocks in blockchain? In my project for one particular functionality, I want to traverse through all the Transactions. For that purpose I want to traverse through all the blocks in blockchain.
If you are intent on doing it with c++, there is a blockchain parsing library that may help you here https://code.google.com/p/blockchain/. 

Depending on your application, though, I might recommend just writing a terminal script to use the daemon. It probably won't be as fast, but I bet it would be easier to get up quickly. These commands can be called to get you the info you need:


// Gets the block at index index
./bitcoin-cli getblockhash {index}

// Gets the block using the result of the first statement
./bitcoind-cli getblock {hash} 

// The block has an array of transactions in it
for (Tx tx : block.tx) {
    ./bitcoind-cli getrawtransaction {tx} 1
}