In this program, we are going to see how to print statements using static operator in C++ Programming Language.
The Code given below can be used in TURBO C++ Compilers: -
/*C++ program to print WELCOME TO HFC!!! */
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
class print
{
public:
static void show(void)
{
cout << "Welcome to HFC!!!";
}
};
void main()
{
system("cls");
print::show();
getch();
}
//.........Coded by YASH ALAPURIA
The Code given below can be used in gcc/g++ Compilers: -
/*C++ program to print WELCOME TO HFC!!! */
#include<iostream>
#include<stdlib.h>
using namespace std;
class print
{
public:
static void show(void)
{
cout << "Welcome to HFC!!!";
}
};
int main(void)
{
system("cls");
print::show();
return 0;
}
//.........Coded by YASH ALAPURIA
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP