When you are dealing with large amounts of data (like classes), you almost always want it on the heap. As previously mentioned, the stack is rather small, and putting a whole bunch of data on it could easily cause it to overflow. The heap, however, is much larger, and therefore better for classes, structs, etc. Just make sure you always deallocate: the stack does that for you, the heap does not.
int main() {
int x = new int;
//Use the variable
delete x; //Deallocate now that your done
return 0;
}
on top like that. You are putting all that junk into the global namespace, which isn't good practice. I'd recommend putting it inside functions instead, or at least, only do stuff like this:
using std::cout;
using std::cin;
using std::string;