How can I declare such a simple function in C++?

I used to program with C. Now I've moved to C++.
Is there any syntax comparison chart or table?