@Militie, I just added the #include string. I had it up there before, but deleted it idk why. Still is doing the same thing though when I added the include string. Also whats wrong with using namespace std? That's how ive been taught :/
@ne555, thanks! I honestly thought it was my program being bad. I was looking through it for about 30 min, didnt even see the semicolon. It works now though :)
I don't usually nazi about not usingnamespace std;, but I like to not use it because it clearly shows what, and what is not part of the standard library.
But when you start using <algorithm> never use usingnamespace std;.
Im actually learning that part right now. In this book, the first thing he says is, "In order to use the STL algorithms, I include the file with their definitions. #include <algorithm> As you know, all STL components live in the std namespace. By using the following code (as i typically do), I can refer to algorithms without having to precede them with std::. using namespace std;" I've been using them in my last book, and just found out about std:: when i got this book. Although, this one doesnt use it. Just like he said, he uses 'using namespace std;'. So i dont know where to put std::. If there is a book that teaches the std:: way, ill get it.