I have a .cc file with several methods in it. I also have some structs declared at the top of the file that I use inside of the .cc file. I'd like these structs to have methods, ie. I'd like the structs to be classes. Is that only a matter of replacing the word struct with class?

Currently I have:
Code:
struct A
{
     int a1;
     int a2;
}
I'd like to have:
Code:
class A
{
     int a1;
     int a2;
     int add(void)
     {
           return a1+a2;
     }
}
Is that all I have to do?