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

Threaded View

  1. #2
    Join Date
    Mar 2004
    Location
    KL, Malaysia
    Posts
    63

    Re: using data in a file

    How would I make my program get just the numeric input from the lines with an 'M', so that I can find their average?
    1. Read one row from file and store in a CString variable.
    2. Use CString::Tokenize to extract 2nd and 4th value to local string variables
    3. Compare if 2nd value is 'M', if yes then further convert 4th value to integer
    4. Do further calculations here
    5. Repeat step 1
    Last edited by ckweius; February 19th, 2009 at 10:26 PM.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured