- 1
How to fill entire screen with any character in C?
I don't want infinite loop..Loop should stop when screen is filled once..What should be the condition or approach?
6 Respostas
+ 5
When you say screen, do you mean the Terminal ?
If yes : windows or unix (Linux, mac) ?
If no : what graphical library do you use ?
In either case you need to know the number of rows and column of your terminal or window. For this last one, you will rather need to define it according to the size of the window. Then, you'll just have to display them (adding position for the window)
+ 5
If you want to do events like knowing when the console is redimensionned, you will need kind of an infinite loop. Console is not made for this kind of interaction either way so it will not be good and so on but it is still a fun exercise !
By the way, your IDE might not be the better place to do this kind of things, try run it in the window console
+ 3
So it is the windows' consol : I do not know the functions to do that but you just have to calculate the size of the consol then display the good number of characters. Search in windows.h functions or on google (sorry for my lack of knowledge) you will find your answer there
+ 1
You don't need to apologize here
0
Output screen of IDE in Windows
IDE-CodeBlocks
0
I did it by checking my screen resolution and adjusting loop conditions according to that..But now it is limited to this resolution only..Even if I zoom in my Console..That gets disturbed
and screen looks blank in between or after printing loop