Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > basic c++ inqui...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 9754 of 10094
Post > Topic >>

basic c++ inquiry

by jus.nihei@[EMAIL PROTECTED] Jun 28, 2008 at 01:28 AM

char getChoice(const char* prompt, const char* allowed);
    display prompt and get user input (a char)
    if user entered a valid char (it is within "allowed" string),
       then return that char
    if char is not valid, display error and repeat until a
       valid character is entered


This is an assignment my brother had from his old C++ class, and I was
trying to teach myself how to code.
The above is a chunk taken from the assignment.  I was wondering how I
would write this.  The confusing point for me is the const char*
prompt and const char* allowed, i don't understand the purpose or
function of those statements.

I know how to call, declare, and define a function, I just need help
understanding the const char* purpose.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 4 Posts in Topic:
basic c++ inquiry
jus.nihei@[EMAIL PROTECTE  2008-06-28 01:28:07 
Re: basic c++ inquiry
"Daniel T." <  2008-06-28 16:29:08 
Re: basic c++ inquiry
=?UTF-8?B?RXJpayBXaWtzdHL  2008-06-28 16:58:07 
Re: basic c++ inquiry
"Bo Persson" &l  2008-06-28 16:58:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 9:12:12 CDT 2008.