question about this function clrscr()

I went on a website called cppprojectcode.blogspot.com. I tried to look up the function clrscr(). Does this function exist in C++? I have part of the project example below:

Bangladesh Environment Information

#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>

class Dhaka
{
private:

char name[50];
int rain;
int humidity;
char soil[50];
char kind[50];

public:

void get(char*,char*,char*);
void show()
{
clrscr();
cout<<"Name : Dhaka.";
cout<<"\nSoil colour : Red.";
cout<<"\nRain : Near30-50%";
cout<<"\nHumidity : Near20-40%";
cout<<"\nsoilkind : Normal";
}
};

void Dhaka::get(char *n,char *a,char *g)
{
strcpy(name,n);
strcpy(soil,a);
strcpy(kind,g);
cout<<"Enter rain:";
cin>>rain;
cout<<"Enter humidity:";
cin>>humidity;

cout<<"\n\nArea name : "<<name
<<"\nSoil colour : "<<soil
<<"\nSoil kind : "<<kind
<<"\nRain fall : "<<rain
<<"\nHumidity : "<<humidity;

if (rain<30 || humidity<20)
cout<<"\n\nThe area is near Tangail.";
else if (rain>=30 && rain<35 || humidity>=20 && humidity<25)
cout<<"\n\nThe area is near Gajipur.";
else if(rain>=35 && rain<40 || humidity>=25 && humidity<30)
cout<<"\n\nThe area is near Dhaka.";
else if (rain>=40 && rain<45 || humidity>=30 && humidity<35)
cout<<"\n\nThe area is near Jamalpur.";
else if (rain>=45 && rain<50 || humidity>=35 && humidity<40)
cout<<"\n\nThe area is near Manikganj.";
else if(rain>=50 || humidity>=40)
cout<<"\n\nThe area is near Maimanshing.";
}
class Rajshahi
{
private:
char name[50];
int rain;
int humidity;
char soil[50];
char kind[50];
public:
void get(char*,char*,char*);
void show()
{
clrscr();
cout<<"Name : Rajshahi.";
cout<<"\nSoil colour : Gray";
cout<<"\nRain : Near 35-55%";
cout<<"\nHumidity : Near 40-55%";
cout<<"\nsoilkind : Normal";
}
};

void Rajshahi::get(char *n,char *a,char *g)
{
strcpy(name,n);
strcpy(soil,a);
strcpy(kind,g);
cout<<"Enter rain: ";
cin>>rain;
cout<<"Enter humidity:";
cin>>humidity;


cout<<"\n\nArea name : "<<name
<<"\nSoil colour : "<<soil
<<"\nSoil kind : "<<kind
<<"\nRain fall : "<<rain
<<"\nHumidity : "<<humidity;

if (rain<35 || humidity<40)
cout<<"\n\nThe area is near Panchagar.";
else if (rain>=35 && rain<40 || humidity>=40 && humidity<45)
cout<<"\n\nThe area is near Dinajpur.";
else if(rain>=40 && rain<45 || humidity>=45 && humidity<50)
cout<<"\n\nThe area is near Rajshahi.";
else if(rain>=45 && rain<55 || humidity>=50 && humidity<55)
cout<<"\n\nThe area is near Bagura.";
else if (rain>=55 || humidity>=55)
cout<<"\n\nThe area is near Sirajganj.";
}

First off, please put your code inside code tags.

The clrscr() function would have been a custom written function, something like this..

1
2
3
4
void clrscr( )
{
 system("cls");
}
clrscr() is part of the <conio.h> header.

Unfortunately, <conio.h> is not a part of standard C++. it may not be available at all, or where it is available, you may find the available functions vary from one compiler to another.

@ Chervil Oh yes, I remember it being in Borland C++ (or Turbo C I think) many moons ago, forgot about that.

*Its an age thing*
Topic archived. No new replies allowed.