Why must pt be a pointer? Also, if pt = gets(buffer) - is that checking the return value of gets, or would that return what they actually typed?Code:#include <stdio.h> int main() { char buffer[120]; /* Holds input and output strings */ char *pt; /* A pointer to datatype char */ int returnCode; while ((pt = gets(buffer)) != NULL) { returnCode = puts(buffer); if (returnCode == EOF) { printf("Error on output\n"); } } return 0; }
Thanks



LinkBack URL
About LinkBacks



Hey, your the programming bada$$, not me....I swear I did read that fact, I just forgot! Thanks for the info though