❓ how to use "clrscrn" ??

Posts 1–7 of 7 · Page 1 of 1
❓ how to use "clrscrn" ??
Hi all,

While i was searching in the internet i found a cute function in langage C called "clrscr" to clear the screen, but i didn't found how to use it !!
can some one please tell me how to do ??
Quote Originally Posted by -T_M- View Post
Hi all,

While i was searching in the internet i found a cute function in langage C called "clrscr" to clear the screen, but i didn't found how to use it !!
can some one please tell me how to do ??
clrscr is a really old function (like DOS days, lel), and it requires you to include the conio header file. To be honest, I don't suggest trying to use conio at all being how outdated it is. The reason why you can't use it is because conio.h varies on what functions it contains from compiler to compiler. Most modern IDE's/compilers have phased out clrscr entirely. Instead, use: system( "CLS" ). Make sure to include the windows header file.
Code:
#include <windows.h>

int main ( void )
{

    int i;

    for ( i = 0; i < 10; i++ )
    {

        printf( "This is loop number %d", i + 1 );
        Sleep( 500 ); /* Pauses the program for half of a second to stop it from running too fast */
        system( "CLS" ); /* Clears console screen */

    }

    return 0;

}
Oh thank you VERY MUCH for the informations, that realy helped me, and i wanted also to know how to pause the programme for a little time but you already told me how !!
i found the conio header file in a programme while i was trying to find the answer of an exercice, and when i searched more about it i found this function (clrscr) i've tried out [system("clrscr")] but didn't work and now i feel VERY LUCKY cuz i found this forum !!

Thanks again ^_^
Quote Originally Posted by Woodhouse View Post

clrscr is a really old function (like DOS days, lel), and it requires you to include the conio header file. To be honest, I don't suggest trying to use conio at all being how outdated it is. The reason why you can't use it is because conio.h varies on what functions it contains from compiler to compiler. Most modern IDE's/compilers have phased out clrscr entirely. Instead, use: system( "CLS" ). Make sure to include the windows header file.
Code:
#include <windows.h>

int main ( void )
{

    int i;

    for ( i = 0; i < 10; i++ )
    {

        printf( "This is loop number %d", i + 1 );
        Sleep( 500 ); /* Pauses the program for half of a second to stop it from running too fast */
        system( "CLS" ); /* Clears console screen */

    }

    return 0;

}
Yeah that's right.
But you need this only when you make a Win32 console application
So when you want to make hax forget win32 console application.
Best way to make hax is directly inject the dll into the process
Because win32 console app is external. But when you got a memory detection bypass you can
use what you want

Quote Originally Posted by _PuRe.LucK* View Post


Yeah that's right.
But you need this only when you make a Win32 console application
So when you want to make hax forget win32 console application.
Best way to make hax is directly inject the dll into the process
Because win32 console app is external. But when you got a memory detection bypass you can
use what you want

Well that's pretty obvious. Considering the function "clears the console screen".
Nik !! speak english plz !! hehe
x_X i don't know what dll or hax is X_x

i found some dll files in games files but i don't know what is it exactly and what it's used for, and this is the first time i meet "hax" :-/ so if you can explaine that a little more that will be perfect (if i should wait till i learn somthing else i can understand)

i've just started to learn language c and i learning it very well but i want to know how can i introduce a sound file or image file in a programme ??

and i hope you'll get better ASAP chickeninabiskit
(delet this post plz)
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us