Wednesday, May 20, 2020

Print statement by omitting namespace in C++

  • Program :
#include <iostream>
#include <string>
using namespace std;

int main() {
  cout <<"\n----------------OMITTING NAMESPACE----------------\n";
  std::string a = "Hello";
  std::cout << a;
  return 0;
}




  • Output :


No comments:

Post a Comment

Function Overloading in C++

https://monitechvenkat1620.blogspot.com Program : #include <iostream> using namespace std; int c(int x, int y) {   return...