output display in screen required

This is a discussion on output display in screen required within the C++ Programming forums, part of the General Programming Boards category; I am beginner to C++, I have turbo C++ , Windows XP OS I tried simple pro gramme. I could ...

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    5

    output display in screen required

    I am beginner to C++,
    I have turbo C++ , Windows XP OS

    I tried simple pro gramme. I could not get result in screen. But i use window menu output i can see output. i can see output through dos shell

    I wish to get results immediately on screen any method to print results immediately in screen

    include<iostrem.h>
    main()

    cout << "hello c++\n";
    return o

  2. #2
    Registered Abuser Loic's Avatar
    Join Date
    Mar 2007
    Location
    Sydney
    Posts
    115
    im not to sure what you are asking for here... but from what i understand this should be what you are looking for...

    Code:
    include<iostrem.h>
    
    main()
    {
        cout << "hello c++\n";
        system("pause");
        return 0
    }

  3. #3
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Turbo C++ sucks. Throw it away and get a decent compiler like Visual C++ or gcc.

    <iostream.h> is wrong. The correct header file is <iostream> (without the ".h")

    You use cout without a using statement. In a standard compiler your code won't compile.
    Either explicitly use std::cout or put a using namespace std; statement after your #include statements.

  4. #4
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,655

  5. #5
    Registered User
    Join Date
    Aug 2008
    Posts
    5

    I got error message

    When i tried system("pause");
    I got error message " Function system should have a prototype "

    Please give me reason how can i proceed ?

    Senthil

  6. #6
    Registered User Kernel Sanders's Avatar
    Join Date
    Aug 2008
    Posts
    61
    You need to include cstdlib to use the system function

  7. #7
    Registered User
    Join Date
    Aug 2008
    Posts
    5

    Again error message

    I used
    #include<cstdlib.h>
    i tried # include<cstdlib>

    Error message " unable to open include file cstdlib"

  8. #8
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    If you are using the ancient Turbo C++, you probably should update to a compiler that isn't 10+ years old, and that follows the C++ standard, rather than the pre-standard language.

    But for a quick solution, try including <stdlib.h> instead.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  9. #9
    Registered User
    Join Date
    Aug 2008
    Posts
    5

    c++ software

    Thanks for your message

    Whether borland C++ 5.5 compiler ok ?

    I am beginner to C++ which one is recommended ? borland or turbo ? where can i download ?

    Thanks
    senthil kumar

  10. #10
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by imagetvr View Post
    Thanks for your message

    Whether borland C++ 5.5 compiler ok ?

    I am beginner to C++ which one is recommended ? borland or turbo ? where can i download ?

    Thanks
    senthil kumar
    I'm pretty sure that's like asking which is better, getting repeatedly hit in the head with a hammer, or having your fingernails pulled out one at a time -- the correct answer is "neither". We just had a what-compiler-should-I-use thread in the last twelve hours or so, so read the forum. (Edit: It was on the C programming forum, but all the ones mentioned are C++.)
    Last edited by tabstop; 08-19-2008 at 10:58 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting output to screen from a file
    By clearrtc in forum C Programming
    Replies: 2
    Last Post: 08-20-2006, 04:19 PM
  2. Base converter libary
    By cdonlan in forum C++ Programming
    Replies: 22
    Last Post: 05-15-2005, 02:11 AM
  3. Cursor React to Screen Display
    By Lugtz in forum Windows Programming
    Replies: 5
    Last Post: 10-22-2004, 10:51 PM
  4. Replies: 1
    Last Post: 04-01-2002, 03:08 PM
  5. Screen display
    By neandrake in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 02-25-2002, 08:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21