Howdy, Stranger!

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

Categories

USING NAMESPACE STD STILL DOES NOT WORK

SKINSMADSKINSMAD Member Posts: 11
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

  • quagsirequagsire Member Posts: 37
    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]

  • Geeth AsokanGeeth Asokan Member Posts: 127
    : 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]



  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    _________ [ http://forcoder.org ] free ebooks and video tutorials about || Scratch C# Perl Go JavaScript Python C++ Visual Basic .NET C PHP R Assembly Visual Basic Swift Delphi MATLAB PL/SQL Ruby Java Objective-C ABAP Lisp Kotlin VBScript COBOL Clojure F# Prolog Transact-SQL Crystal LabVIEW D ML Ada Scala Dart Awk Bash Julia Fortran SAS Hack Erlang Rust Apex Lua Scheme Alice Logo FoxPro || _____

Sign In or Register to comment.