You are not logged in. Please login at www.codechef.com to post your questions!

×

Using namespace std

I had these questions for a while now so I thought I had to ask somewhere.

  1. What does 'using namespace std' mean in C++?
  2. why does the program give compilation error when it is not used?

asked 19 Aug '17, 09:19

monsterguy's gravatar image

3★monsterguy
695
accept rate: 0%


Answer is hidden as author is suspended. Click here to view.

answered 19 Aug '17, 10:06

raj79's gravatar image

1★raj79
(suspended)
accept rate: 10%

The typical syntax of statements like con, cout etc is "std::cin>>a"

With using namespace std, you can avoid writing that "std::" part everytime. Without it, std:: must be written else it gives a compilation error.

This Q can be easily googled too, make sure you give googling an attempt as well for syntax related issues.

link

answered 19 Aug '17, 09:39

vijju123's gravatar image

4★vijju123 ♦♦
15.4k12066
accept rate: 18%

1

I think we should downvote such questions.. people are using it to get fake up votes.. -_-

(19 Aug '17, 15:08) kauts_kanu5★

I have to give a benefit of doubt for beginners, but rest assured, I am keeping a track of situation from my side. :)

(19 Aug '17, 15:21) vijju123 ♦♦4★

coming straight at the point, i guess he thinks that this id is one of ours , ask codechef to verify the ip adress @admin :) that will assure you. if helping begiiners is a problem to you , i guess then no one should have helped you when you were a begiiner at coding :)

(19 Aug '17, 15:55) raj791★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,911
×2

question asked: 19 Aug '17, 09:19

question was seen: 428 times

last updated: 19 Aug '17, 15:57