if/of streams
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: if/of streams

  1. #1
    Join Date
    Oct 2011
    Posts
    10

    if/of streams

    Hello, im stuck writting this little program.

    Code:
    outdata.open("currentsales");
    
    outdata <<  ????;
    
    indata.open("projectedsales");
    
    indata >>  ???? * 2 >> endl;
    
    
    
    indata.close();
    outdata.close();
    Im supposed to write the other statements necessary to read one integer from a file called currentsales and write twice its value into a file called projectedsales .

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,261

    Re: if/of streams

    Quote Originally Posted by subzero06
    Im supposed to write the other statements necessary to read one integer from a file called currentsales and write twice its value into a file called projectedsales .
    Therefore, you need an input stream for the currentsales file and an output stream for the projectedsales file. Also, you need an integer variable to hold the input read, and with which you can compute the output to write.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center