Previous topic

GetRootDirectory

Next topic

GetSaveFileName

This Page

getsΒΆ

The gets function reads a line from the Command Window and stores it in ssInputLine. The line consists of all characters up to and including the first newline character (“\n”). gets then replaces the newline character with a null character (“0”) before returning the line.

ssInputLine = gets()

Return Value

ssInputLine is the input string.

Example

printf("Input a string: ");s = gets();printf("Your input was: %s\n", s);

See also

printf

id-1437485