Hi, i was wondering how i could specify the length of something in a console program like:
How would i make it so state was two letters as in AZ or CA?Code:#include <iostream.h> #include "apstring.h" int main() { apstring state; cout << Which state do you live in? cin >> state; cout state; }
thanks!