I'm fairly new to c++ myself, but I can help you a bit as I did this as my final year project.
Are you aiming for a secure system? That is, one that involves cryptography? If so, you might want to start reading on encryption and the lot. I'm sure there's a security API for C++. You could try the bouncycastle API for c++ (I think they have one for c++).
Otherwise, if you just want to tally votes, then why not try getting each vote into different arrays and finding the array size? Say if your system was for obama and mccain, all obama votes (in string) would enter an array for obama, and all mccain votes would enter an array for mccain, and at the end of the election, you find out the size of each array to get the tally.
Sorry I can't provide code examples. I don't know how to. But im sure someone can. Just wanted to give you an idea in case you actually know how to write c++ codes ;)