Tell you what: Since your post doesn't contain a question to be answered, I'll just volunteer a tip: http://www.ideone.com. It is capable of running your C++ code snippets. Want to know if the above is true? Write a tiny program in there and see for yourself.
Here's a skeleton you can use:
1 2 3 4 5 6 7 8 9
#include <iostream>
usingnamespace std;
int main()
{
//Here you put the code you want tested.
return 0;
}