@ OP:
http://cplusplus.com/forum/beginner/1988/
It almost looks like you've been to the above thread...
http://cplusplus.com/forum/lounge/79237/
http://www.cplusplus.com/articles/36vU7k9E/
@ bisbeejim:
http://www.cplusplus.com/forum/articles/11153/
(not related to the above link):
What build errors you got? |
You don't tell what errors you get...
When I compile the above (code), I get errors as well:
alphabet.cpp: In function 'int main()':
alphabet.cpp:44: error: 'numeric_limits' was not declared in this scope
alphabet.cpp:44: error: expected primary-expression before '>' token
alphabet.cpp:44: error: no matching function for call to 'max()' |
This is pretty simple, if you go to the first thread (which I assume you have, because it seems like line 29 was a copy and paste), you will see that you have to
#include <limits>
You also don't need to use std:: on anything because you are
using namespace std;
already.
After including limits, I got it to compile fine, but it won't run, pops up with an error about how the program has stopped working.
I won't get into that because I have class in a couple of minutes, maybe one of the more
experienced members can
properly explain what you are doing wrong and
guide you in in the right direction to fixing your program.