Laserlight:
Well that one works fine, aside from the fact that i had to throw in a pause to stop it from exiting instantaneously. But why is my bigger version not working then? I tried including windows.h, but it isn't helping.
Maxorator:
The program now looks like this:
Code:
#include <iostream>
#include <windows.h>
#include <string.h>
#include "function.h"
using namespace std;
int main()
{
char sentence1[] = "Why ain't this working!?";
int length = strlen(sentence1);
printout(sentence1, length, 100);
}
and the header:
Code:
#ifndef _FUNCTION_H
#define _FUNCTION_H
#include <windows.h>
inline void printout(char sentence[], int length, int interval);
inline void printout(char sentence[], int length, int interval)
{
int x;
for (x=0; x<length; x++)
{
cout<< sentence[x];
Sleep(interval);
}
}
#endif
and it still is not working. Im just getting a "Printout undeclared(first use of this function)"?
Tropicalia:
I'm afraid not.