Results 1 to 7 of 7

Thread: Friend Needs C++ Programming Help

  1. Friend Needs C++ Programming Help

    Ok, so here's what my friend needs for his intro to C++ programming class:

    "I want to read in a name and numbers from a file and store them as variables. In the input file the information is displayed in lines as names followed by a series of integers; I would like to store the numbers as variables and average them for each individual line. The main problem is using the get command for storing the numbers as separate variables while keeping them separate from the names."

  2. post a sample of the input file from your homework

    I mean your friends homework

  3. I'm a molecular biology major about to graduate next quarter (and currently on spring break), it really is my friend that needs help.

    Here's what the input file looks like:
    Drew Nancy 96 74 77 66 60 55 50 61 79 62
    Smith Doug 61 61 54 69 61 78 89 65 61 54
    Baker Charlie 93 57 51 61 72 61 57 45 72 78
    Chang Tony 69 95 81 62 74 64 97 62 92 94
    Mitterand Stephen 58 48 66 52 68 65 58 70 70 58
    Smiley Tavis 93 57 70 65 69 95 61 69 48 97
    Vue Hung 84 85 74 81 98 68 90 78 98 91
    Tsao Cathy 84 69 84 91 46 54 82 84 67 97
    Hernandez Javier 79 95 100 49 53 81 96 52 83 47
    Gomez Jeff 95 65 77 60 57 55 92 54 89 86
    Miller Margaret 62 64 78 75 81 80 92 69 77 61
    So what he wants the output to do is display the name, followed by the numbers, and then finally an average of the numbers.

  4. http://www.yolinux.com/TUTORIALS/Lin...ringClass.html

    tell your friend to ctrl+f for "Read lines from input file", they'll get a decent enough idea on how to work it from there

  5. #5
    I've done this before, but I don't remember how to code anything other than hello world.

    Where is Gir? She is really smart. I bet she knows the answer to this.

  6. Yeah, my friend actually got help from some guy on GameFAQs, haha. Thanks anyway though. I'll forward that link to him if he needs help in the future.

  7. Ugh, parsing strings. /slits throat

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Games.com logo