how to see all the values???HELP!!!

This is a discussion on how to see all the values???HELP!!! within the C++ Programming forums, part of the General Programming Boards category; How am i gonna see all the values that are being displayed when i complie the script and run it!!!!i ...

  1. #1
    Whats gonna happen now! himanch's Avatar
    Join Date
    Feb 2005
    Location
    Armenia
    Posts
    26

    how to see all the values???HELP!!!

    How am i gonna see all the values that are being displayed when i complie the script and run it!!!!i mean when i run it there are about 20 values that are being seen but the others dissapears namely stay up the screen and since there is rolling bar i cannot see them!!!

    #
    Code:
    include <iostream>
    
    using namespace std;
    
    int main()
    {
        int x;
        
        for( x=-65 ; x < 5 ; x++)
        {
             cout<< x <<endl;
             }
             cin.get();
             }
    Hayda!!!Whats gonna happen tomorrow

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,496
    I usually redirect programs which produce lots of output to a file which I then read with an editor
    myprog.exe > results.txt

    Or use a pager to view output a page at a time
    myprog.exe | more
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Whats gonna happen now! himanch's Avatar
    Join Date
    Feb 2005
    Location
    Armenia
    Posts
    26
    but isnt there a way which shows all the values when i run the program???
    Hayda!!!Whats gonna happen tomorrow

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Format them differently. Output them on one line instead of many.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Whats gonna happen now! himanch's Avatar
    Join Date
    Feb 2005
    Location
    Armenia
    Posts
    26
    thkz but how can i output them on the same line?
    Hayda!!!Whats gonna happen tomorrow

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,496
    > thkz but how can i output them on the same line?
    Please stop mushing the spelling by using 'z' all over the place

    Well you could remove the endl from each iteration of the loop, and just do ONE endl when the loop exits.

    But then you'll probably complain that your line is now too long.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

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