Thread: Simple C++ code doesn't work

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    19
    Code:
    std::
    if you write using namespace std; at the begining of your code (straight after the includes) you will not have to prefix commands with std::

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    Quote Originally Posted by rickyoswaldiow
    Code:
    std::
    if you write using namespace std; at the begining of your code (straight after the includes) you will not have to prefix commands with std::
    Importing the entire namespace is generally not reccomended.
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    Quote Originally Posted by rickyoswaldiow
    Code:
    std::
    if you write using namespace std; at the begining of your code (straight after the includes) you will not have to prefix commands with std::
    Yeah, but that tends to work well for small, beginner programs but makes more advanced programs harder to read and write. I say, don't learn anything you're going to spend time unlearning later.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple program won't work on a friend's comp
    By Ouendanation in forum C++ Programming
    Replies: 6
    Last Post: 01-25-2008, 08:03 PM
  2. Replies: 7
    Last Post: 11-15-2007, 01:36 AM
  3. Replies: 4
    Last Post: 11-10-2007, 06:02 PM
  4. Replies: 9
    Last Post: 09-09-2007, 08:08 AM