How do I use scanf() and gets() functions with the PICC/PICC18 compiler ?
Q. How do I use scanf() and gets() functions with the PICC/PICC-18 compiler? A. The gets() function is not supplied by the compiler. Becuase gets() will get a string from a programer specified input, such as the serial port, it is easier for the programer to write this function then for it to be supplied in a library. There is a console get string function, cgets(), that will read string from an input using console formatting. The cgets() function is available in the cgets.c file in the sources directory. To use the cgets() function you will need to inlcude the cgets.c file in you project and define the getch() and getche() to read a character from the specified input. The scanf() function is available in the sources directory of the compiler. The following files will be needed to be included in your project: scanf.c cgets.c doscan.c scanbuf.c The getch() and getche() functions will also have to be defined.