Originally Posted by
ingenting
Hello!
I am using the lines:
printf("\n\n");
system("cls");
system("pause");
alot when im coding me school projects and i was wondering if its possible to make like alias to those lines.... It would be sweet if i could write:
line
cls
pause
instead of repeating the same lines over and over again....
Tyvm!
Code:
#include <stdio.h>
#define pause system("pause")
int main()
{
pause;
pause;
pause;
return 0;
}
or if you really want to not have a bunch of defines in the top of your source you can make another file and include it.
Code:
//personalize.h
#define line printf("\n\n")
#define cls system("cls")
#define pause system("pause")
then do:
Code:
#include <stdio.h>
#include "personalize.h"
int main()
{
pause;
pause;
pause;
line;
cls;
return 0;
}