USING NAMESPACE STD STILL DOES NOT WORK

HOWDY

I HAVE TAKEN ALL THE H'S OUT OF THE PREPROCESSORS, AND I STILL GET AN ERROR, THAT THE "STD", IS NOT RECOGNISED AS A VALID TYPE NAME.

ANY SUGGESTIONS, OR DOES ANYONE KNOW OF ANY OTHER NAMESPACE NAMES, THAT WOULD WORK WITH BORLAND C++ VERSION 5.

ALWAYS APPRECIATE THE HELP

REGARDS

SKINSMAD

Comments

  • Hi,
    namespace std is declared in some header files (eg. string). Try adding #include .

    I use Borland C++ 5.02 and the following compiles fine :
    [code]
    #include
    #include
    using namespace std;

    int main()
    {
    cout << "Hallo";
    }
    [/code]

  • : HOWDY
    :
    : I HAVE TAKEN ALL THE H'S OUT OF THE PREPROCESSORS, AND I STILL GET AN ERROR, THAT THE "STD", IS NOT RECOGNISED AS A VALID TYPE NAME.
    :
    : ANY SUGGESTIONS, OR DOES ANYONE KNOW OF ANY OTHER NAMESPACE NAMES, THAT WOULD WORK WITH BORLAND C++ VERSION 5.
    :
    : ALWAYS APPRECIATE THE HELP
    :
    : REGARDS
    :
    : SKINSMAD
    :

    Try this instead:

    [code]
    #include

    int main()
    {
    std::cout << "Hello world!
    " << std::endl;

    return 0;
    }
    [/code]



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories