Hello,
What is the difference between -------->
1. clrscr(); // defined in various header files
2. system("cls"); //available in stdio.h in bloodshed dev c++
Well, if there are no differences, then can we use them interchangebly?
PLUS,
I saw a bit slower execution of program (I'm not sure about this fact) while execution of my code that contained system("cls"); than clrscr();. Does that implies that system("cls"); is slower in execution in clrscr();? If yes, what's the reason for it?
THANKS TO EVERYONE IN ADVANCE...........
=============
[AmbrNewlearner]
=============
9 27221
The system() function fires up an entire shell or command line interpreter, whatever
is available on your system and passes its argument to it. That may take some
time to complete. I don't know what your clrscr() function does but it probably
calls some highly system dependent functionality.
kind regards,
Jos
The system() function fires up an entire shell or command line interpreter, whatever
is available on your system and passes its argument to it. That may take some
time to complete. I don't know what your clrscr() function does but it probably
calls some highly system dependent functionality.
kind regards,
Jos
Well, clrscr() simply clears the screen (similar to "cls" command for DOS).
One more question,
I have recently switched from Borland Turbo C++ 3.0 (IDE + compiler) to Bloodshed Dev c++ (IDE) PLUS gcc (compiler).
Now my question is as follows---->
Can I use the include (or header files) available with Turbo C++ 3.0 in C programming using [Bloodshed Dev C++] + [gcc] combination.
THANKS IN ADVANCE....
=============
[AmbrNewlearner]
=============
Well, clrscr() simply clears the screen (similar to "cls" command for DOS).
Yes, but the question was (and is) *how* does it do it? I briefly explained how that
system("cls") managed to clear the screen on a Windows machine (it'll fail
horribly on a Linux machine without any precautions) but we still don't know
how the clrscr() function accomplishes it. So the problem is not *that* it does
what you want, the problem is *how* does it do it.
One more question,
I have recently switched from Borland Turbo C++ 3.0 (IDE + compiler) to Bloodshed Dev c++ (IDE) PLUS gcc (compiler).
Now my question is as follows---->
Can I use the include (or header files) available with Turbo C++ 3.0 in C programming using [Bloodshed Dev C++] + [gcc] combination.
No, because those header files might expose certain structures used by a
library of vendor X; a library of vendor Y might use entirely different structures.
kind regards,
Jos
THANKS JosAH.......
Yes, but the question was (and is) *how* does it do it? I briefly explained how that
system("cls") managed to clear the screen on a Windows machine (it'll fail
horribly on a Linux machine without any precautions) but we still don't know
how the clrscr() function accomplishes it. So the problem is not *that* it does
what you want, the problem is *how* does it do it.
If you find something about this in future, please tell me.
No, because those header files might expose certain structures used by a
library of vendor X; a library of vendor Y might use entirely different structures.
kind regards,
Jos
OK, THANKS again...
=================
[AMBRNEWLEARNER]
=================
Can I use the include (or header files) available with Turbo C++ 3.0 in C programming using [Bloodshed Dev C++] + [gcc] combination.
The only thing you are guaranteed is the implementation of the standard library. So only expect the header files for the standard library. There might be compiler specific header files, but as the phrase suggests, these are compiler specific.
The only thing you are guaranteed is the implementation of the standard library. So only expect the header files for the standard library. There might be compiler specific header files, but as the phrase suggests, these are compiler specific.
Thanks oler1s..........
============
AmbrNewlearner
============
(In response to Josah’s comment about not knowing how clrscr() works) If you find something about this in future, please tell me.
I think you fail to understand what Josah is saying. clrscr is not part of any open standard. We cannot know how it works because it is compiler proprietary.
I think you fail to understand what Josah is saying. clrscr is not part of any open standard. We cannot know how it works because it is compiler proprietary.
Yeah, I misinterpreted JosAH.
But I now understand your point.
Thanks JosAH and oler1s......
============
AmbrNewlearner
============
system("cls")works in the same way as clrscr(),but the former seems slower than the latter i strongly advice to use the better option(quicker one)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: AHR |
last post by:
Hi NG
I am learning MFC but only use the command promt at the moment to run my C++
programs.
My problem is that i cant use clrscr() even if i include <conio.h>.
I get this error:
****
|
by: Binny V A |
last post by:
Hello Everyone,
I have been programming in C++ with borland compiler for a while now.
But when I try to compile the same programs with other complilers like
mingw, digital mars etc. there are...
|
by: lavender |
last post by:
In C programming, izzit got this function
1. clrscr( ); ?
what header file I should use?
2. <conio.h>
I donnon C programming have this header file or not, which I know is in ...
|
by: bluesteel |
last post by:
Hi guys. I have programmed in c and use clrscr() from conio.h. The problem was that, when i started programming under c++ i found that clrscr is nonexistant! Even if i include conio.h it will not...
|
by: playagain |
last post by:
Why I can't use the clrscr(); and gotoxy(); in some compilers?
|
by: Michele 'xjp' |
last post by:
Hi there,
I am using a POSIX-compliant system, Cygwin on Windows.
I need the features of conio.h's getch() and clrscr(), but I can't
compile programs with #include <conio.h(since conio.h is NOT...
|
by: rahul1989 |
last post by:
can we use clrscr() function without using conio.h header file
|
by: Abhishek170 |
last post by:
hello everyone,
i'm just a beginner in C language. just wanted to ask wich include will i have to use while using gotoxy and clrscr or is there any link/site where i check all the functions in all...
|
by: naughtysriram |
last post by:
what are the equivalent library functions found in conio.h (turbo c++)
for other gnu c++ variations..
i need functions like
gotoxy(),
clrscr(),
getch()...etc.
thanks in advance
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |