How to represent "RESERVED 1 byte" & "RESERVED 4 byte" in a line ...!!

Discussion in 'C++' started by ssmile03@gmail.com, Nov 6, 2013.

  1. Guest

    I have a LINE having different entries (data, char, string, int, space, blank) like | A | | 12 | | SPACE | BLANK | RESERVED 4 BYTE | 90 | 45 | RESERVED 1 BYTE | | ...

    How to represent SPACE, BLANK, RESERVED 1 BYTE and RESERVED 4 BYTE in a line when allowed to write to a file through ofstream inp?

    E.g:

    std::cout <<"PLEASE ENTER THE QUANTITY: ";
    cin >> qty;
    std::cout <<"PLEASE ENTER THE name: ";
    cin >> dPrice;
    inp <<"ENTRY=" "|" " " "5000" " " "|" " " "5001" " " "|" " " "0" " " "|" ..

    Thanks
     
    , Nov 6, 2013
    #1
    1. Advertising

  2. Ian Collins Guest

    Re: How to represent "RESERVED 1 byte" & "RESERVED 4 byte" in a line...!!

    wrote:

    Please don't multi-post

    --
    Ian Collins
     
    Ian Collins, Nov 6, 2013
    #2
    1. Advertising

  3. Re: How to represent "RESERVED 1 byte" & "RESERVED 4 byte" in a line...!!

    On 06.11.2013 04:59, wrote:
    > I have a LINE having different entries (data, char, string, int, space, blank) like | A | | 12 | | SPACE | BLANK | RESERVED 4 BYTE | 90 | 45 | RESERVED 1 BYTE | | ...
    >
    > How to represent SPACE, BLANK, RESERVED 1 BYTE and RESERVED 4 BYTE in a line when allowed to write to a file through ofstream inp?
    >
    > E.g:
    >
    > std::cout <<"PLEASE ENTER THE QUANTITY: ";
    > cin >> qty;
    > std::cout <<"PLEASE ENTER THE name: ";
    > cin >> dPrice;
    > inp <<"ENTRY=" "|" " " "5000" " " "|" " " "5001" " " "|" " " "0" " " "|" ..
    >
    > Thanks
    >


    The question is very unclear.

    It appears to about some original (homework?) question stated by someone
    else.

    Perhaps quote that, and indicate what the C++ problem is?


    Cheers & hth.,

    - Alf
     
    Alf P. Steinbach, Nov 6, 2013
    #3
  4. osmium Guest

    "Alf P. Steinbach" wrote:

    > On 06.11.2013 04:59, wrote:
    >> I have a LINE having different entries (data, char, string, int, space,
    >> blank) like | A | | 12 | | SPACE | BLANK | RESERVED 4 BYTE | 90 | 45 |
    >> RESERVED 1 BYTE | | ...
    >>
    >> How to represent SPACE, BLANK, RESERVED 1 BYTE and RESERVED 4 BYTE in a
    >> line when allowed to write to a file through ofstream inp?
    >>
    >> E.g:
    >>
    >> std::cout <<"PLEASE ENTER THE QUANTITY: ";
    >> cin >> qty;
    >> std::cout <<"PLEASE ENTER THE name: ";
    >> cin >> dPrice;
    >> inp <<"ENTRY=" "|" " " "5000" " " "|" " " "5001" " " "|" " " "0"
    >> " " "|" ..
    >>
    >> Thanks
    >>

    >
    > The question is very unclear.
    >
    > It appears to about some original (homework?) question stated by someone
    > else.
    >
    > Perhaps quote that, and indicate what the C++ problem is?


    Amen on the unclear. I keep thinking he wants something like a COBOL
    PICTURE statement, clause, whatever, and has a radical misconception of some
    sort. I would remind the OP that the meaning of data is in the *mind* of
    the person that wrote the code that wrote the file. The meaning is not
    embedded in the code, per se.
     
    osmium, Nov 6, 2013
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lezah
    Replies:
    0
    Views:
    486
    lezah
    Feb 4, 2004
  2. Hugo
    Replies:
    10
    Views:
    1,323
    Matt Humphrey
    Oct 18, 2004
  3. kaushikshome
    Replies:
    4
    Views:
    777
    kaushikshome
    Sep 10, 2006
  4. scad
    Replies:
    23
    Views:
    1,177
    Alf P. Steinbach
    May 17, 2009
  5. Marek Stepanek
    Replies:
    12
    Views:
    418
    Peter J. Holzer
    Sep 2, 2006
Loading...

Share This Page