User Profile

Collapse

Profile Sidebar

Collapse
jeromytheoutlaw
jeromytheoutlaw
Last Activity: Mar 24 '08, 04:25 PM
Joined: Mar 16 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jeromytheoutlaw
    replied to sorting with vectors
    in C
    Code:
    #include <iostream>
    #include <fstream>
    #include <string>
    #include <vector>
    using std::string;
    using namespace std;
    
    void printvector(vector<double>gpaAry, vector<string>names, int size);
    void sort(vector<double> & gpaAry, vector<string> & names, int size);
    int smallest(vector<double>gpaAry, int start, int size);
    ...
    See more | Go to post

    Leave a comment:


  • jeromytheoutlaw
    replied to sorting with vectors
    in C
    the assignment was to use two vectors.
    also i fixed the declarations but to no avail.

    in class we haven't learned structs and we are just now learning classes.
    so im supposed to figure this out but doing it like this...

    ps. thanks for quick reply...
    See more | Go to post

    Leave a comment:


  • jeromytheoutlaw
    started a topic sorting with vectors
    in C

    sorting with vectors

    [CODE=cpp]/*
    Write a program that reads names and gpa’s from a text file. The file looks like:

    James 3.9
    Margaret 3.5
    Charles 1.2
    Jennifer 4.0

    Your program sorts the students ascending by gpa, and prints the sorted list including names.
    To keep the names with the numbers use parallel arrays, one for the names, the other for the numbers.
    Sort the numbers. Whenever you...
    See more | Go to post
    Last edited by Ganon11; Mar 16 '08, 01:57 AM. Reason: Please use the [CODE] tags provided.
No activity results to display
Show More
Working...