howd u do the cool slow print text!?
Code:
void PrintMechanical(char *message, ...)
{
int i, len = strlen(message);
char buff[len + 256];
va_list ptr;
va_start(ptr, message);
vsprintf(buff, message, ptr);
len = strlen(buff);
for(i = 0; i < len; i++){
printf("%c", buff[i]);
Sleep(5 + (i * 10));
}
}
How would i go about reading in the files?
I just opened a file and counted the newlines, and the maximum string length of all lines. Then I declared an array like this:
char array[count][maxlen];
I used fgets() to read in the array...
Would there be a better way to check for comparisons then say an if statement?
What I did was to split each string in the "response" file, and used this simple loop:
for(count of response strings){
found = true;
for(count of words in this response string)
if one word is not found in input string:
then set found to false;
if found, return the index of the response string...
}