I had an assignment from my professor in which I have to build up the code and make it work. I have finished my code and it won't compile, reason being that when I tried to get the value of something, it's not included in the class.. I'm wondering where I went wrong? Can someone help me out please, I'm a beginner in C++ and i've been trying to figure this out for 3 hours but to no avail.. Any help would be great thank you..
#include <iostream>
#include <cstdlib>
#include <string>
using std::cout;
using std::endl;
using std::string;
using std::ostream;
1. Edit your post: Remove all the code, then copy and paste it again within code tags. Code tags are explained here: http://cplusplus.com/articles/z13hAqkS/ . This is so we can see formatted code which is far easier to read. It also numbers the lines so we can refer to specific lines easily.
2. You say you get errors compiling. Always show the errors you are getting. Include the error messages.