![]() |
|
| *Home>>>Telephone Answering |
C++ Help?!?! I need help using the stringlength function in an if statement...? |
i am working on just a side project. nothing to do with class so you arent doing my homework for me. i just need help. i am using getline(cin, phone) to get an account/phone number. i would like to make it to where if the string length is not 10 characters, then it prompts the user to re-enter or press q to quit. i know how to do the else part with: when i was rereading my post i thought of an idea that helped earlier when i was working on the part where i enter the SKU for each movie to be rented.... should the account number be an INT instead of STRING? i think it would make life a little easier and i could get rid of a few lines of code and replace with a short if statement. am i thinking correctly on that part?? just use strlen() function to get the length. yeah, use an int for telephone numbers. I'm new to C too, but I was able to understand this. It's easy to get a length for ints Put all that code in a little while loop like this: If you have a C++ string, you can get its length with s.length(). See http://cppreference.com/cppstring/length... try strlen |
| Tags |
| Business Services Business Address Call Forwarding Call Handling Answering Service Telephone Answering Mail Forwarding Virtual Address Virtual Assistant Virtual Business Virtual Offices |
| Related information |
1) biography 2) physician 3) politician 4) physical 5) biology 6) economy 7) democracy 8) astronomy 9) thermos 10) symphony 11) athlete 12) microscope 13) atmosphere 14) toxic 15) syn... daughter downstairs, washing dishes = female task son watching television = male task two men in black = stranger, insecure tied up = restricted. It may seem like an insecure dream. However,... I know that you love her and there is no one else for you right now but she doesn't want the relationship. How can you just hang around until she falls apart with someone else? Why would y... That's a very long story. Your an adult, you made a bad decision. I'm not sure why you think the loan company has screwed you over. You borrowed money, you knew what the payments would b... Yes. I have a Linksys brand router. It's a great brand and router.One of the best in the market for it's price and speed. If you want more information of it: Price, information, and model... Yawn that was long boring and by the way not a question. ...well yaybob's answer was pretty much all theres to it, but you said that each has a unique probability, so u cant really represent each person with a single pronumeral, since they have unique ... Try this website, ... |
Categories--Copyright/IP Policy--Contact Webmaster |