Is a class similar to a function? im sorry i am very new to c++ and created a text based rpg already. but i wanted to move on to making a 2d game with sfml.but first i would like to at least get a little info on some of the code il be using
No it is in no way similar to function.
Classes are most important thing to OOP and canot be described in one post.
Read either one of the beginner-level books (Say, C++Primer) or read online tutorials like thsese: http://www.cplusplus.com/doc/tutorial/ http://www.learncpp.com/ (Classes are described in chapter 8)
If you don't know what a class is yet you might want to slow down and practice that a bit before moving onto any graphics or games.
A class is like a struct, but it can have functions in it as well.
A struct was from C, and classes added in C++. In C++ you can name a class 'struct' instead of 'class' and it will have almost the same effect, except it will change the access modifiers.
Briefly, it is a "blueprint" to a variable type that you create.
It can have many variables and functions inside of it.
It is too much to really explain here though, so you should check out the tutorials offered by this site to learn them.