multiz_com
2007-05-11 12:55:50 UTC
(1) I have: void getStr(char * str, int maxChars) ; and I need this function to get a string from user (without gets() and scanf()) using getchar(). "str" is the address to start writing characters, and "maxChars" is the maximum number of non-null characters that you can input – at that point you must stop putting characters into the string. The input also comes to an end when a newline is input.
(2) The 2nd is "int stringToInt(char * str)". This function reads in characters starting at the address stored in "str" until it either encounters a non-digit or null.
Thanks for any help!