I was wondering if someone would mind taking a look at this class I'm attempting to make with C++? Something weird is happening, and I'm really not sure why.
We're being forced to use code blocks, so I'm having a huge amount of trouble trying to figure out where the error actually, is.
I ask these kinds of questions a lot and it never really gets places, so I understand if people are bored.
OK, here is my analysis:
1. Line 27: no need for parentheses in cout. Cout's syntax is just:
cout << text << text << text <<...;
2. Line 35: Remove the parenthesis at the end of that line.
3. Line 43: See 1.
4. Line 51: You've got a / here. Remove it, unless you mean a comment. And same thing as 1.
5. Line 59, 68, 70: see 1.
6. Lines 69, 71: change getLine to getline.
7. You never finish main(). You need a final }.
Thanks for that! I also realized that I can't actually check strings against null in c++ for some reason, so that's another thing.
if you are using char* or const char*, you can. but about std::string, you can't
in short, you can check pointers.
you can check std::string* since that is a pointer