learning c++ with gcc-2.95...clear screen?

learning c++ with gcc-2.95...clear screen?

Post by Patrick O'Nei » Fri, 03 Mar 2000 04:00:00



Can someone direct me as to how one would clear the
screen in c++ under linux?  I have read dejanews
archives concerning this and see that there is no
way to do this that is c/c++ generic - that it is
os- and c++ distribution-specific.  That said, I
did a look for any linux-specific c++ programming
newsgroups and find none.  

Can someone please instruct me as to how one clears
the screen in c++?  The model program I am using is
dos/windows based and uses conio.h to provide this
function.  I would like the similar function for
linux.

patrick

 
 
 

learning c++ with gcc-2.95...clear screen?

Post by Eggert.Eh.. » Fri, 03 Mar 2000 04:00:00




Quote:>Can someone direct me as to how one would clear the
>screen in c++ under linux?  I have read dejanews

If you don't reject a good GUI, I would suggest to install kDevelop1.1. It comes
with lot of online help and examples.

--
Eggert Ehmke


 
 
 

learning c++ with gcc-2.95...clear screen?

Post by Alex Vreni » Fri, 03 Mar 2000 04:00:00


Try system("clear);





>>Can someone direct me as to how one would clear the
>>screen in c++ under linux?  I have read dejanews

>If you don't reject a good GUI, I would suggest to install kDevelop1.1. It comes
>with lot of online help and examples.

>--
>Eggert Ehmke


--
Alex Vrenios
Ph.D. Student
Computer Science Dept.

 
 
 

learning c++ with gcc-2.95...clear screen?

Post by Dances With Cro » Fri, 03 Mar 2000 04:00:00


On Thu, 02 Mar 2000 09:36:36 -0700, Patrick O'Neil

Quote:>Can someone direct me as to how one would clear the
>screen in c++ under linux?  I have read dejanews

>Can someone please instruct me as to how one clears
>the screen in c++?  The model program I am using is
>dos/windows based and uses conio.h to provide this
>function.  I would like the similar function for
>linux.

C++?  Hmm.  This works in C:
#include<stdlib.h>
...
system("clear");

the ncurses package is the de facto standard for doing terminal I/O.
There are probably C++ wrappers for it somewhere.  Don't know where; I
tend to use C for the non-graphical stuff.

--
Matt G / Dances With Crows        \          In the MS-DOStrix,
There is no Darkness in Eternity   \----\    there is no fork().
But only Light too dim for us to see     \    
    ===== Usenet: ceci n'est pas une guerre des flammes =====

 
 
 

1. gcc-2.96 to gcc-2.95

I'm having difficulty with gcc-2.96.  Some of which I've been able to
sort out but other out of my league.  For instance, I keep getting these
warning messages when compiling fortran programs:

/usr/bin/ld: Warning: size of symbol `ctime_' changed from 12 to 14 in
Lctime.o
/usr/bin/ld: Warning: type of symbol `ctime_' changed from 1 to 2 in
Lctime.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/libg2c.a(open.o): In function
`f_open':
open.o(.text+0x4e6): the use of `tempnam' is dangerous, better use
`mkstemp'

The most basic compilation command I use is (g77 -o executable file.f
....).  The problem is that all these algorithms ran perfectly fine with
gcc-2.95 but now some run normally and others don't (i.e. seem to
develop segmentation problems).

I'm not skilled enough to mess with the compiler code.  So what issues
am I facing if I try to reinstall the older gcc-2.95 rpm?

Doug

2. tar: Solaris2 - Solaris1 incompatibilty?

3. clear command - Clear does not clear my screen.

4. Isn't this an oxymoron, linux & security?

5. after gcc 2.95.1 installation c++ compiler doesn't work

6. mailbox corrupt

7. REQ: C++ function to clear screen

8. FreeBSD and msql

9. C++ clear screen command

10. Will mplayer compile with gcc-2.95?

11. GCC-2.95 configuration & profile.

12. gcc 2.8.1 vs gcc 2.95.3 optimization on Sparc V8

13. gcc-2.95