Search:
Type: Posts; User: elephant7
Search:
Search took 0.02 seconds.
-
Okay I think I got it to work, if you wouldn't mind checking over the insertion sort function:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
const string...
-
The selection and bubble sorts are working with this code below, but I couldn't figure out how to change the insertion sort to work properly. I tried making int current to Population current, but it...
-
Okay thank you, but it is still looping for some reason:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
const string filename = "population.csv";
const int...
-
So I tried this:
minvalue = data[startscan].pop;
data[startscan] = data[minindex];
data[minindex].pop = minvalue;
and it's still not working
-
a=a+b;
b=a-b;
a=a-b;
or
temp = a;
a = b;
b = temp;
-
I can't figure out what the problem is, I tried using the debugger and didn't have any luck.
-
I tried that and now it says : "warning C4244: '=' : conversion from 'double' to 'int', possible loss of data"
So I changed :
double rank,
pop;
to:
int rank,
pop;
Now it runs, but...
-
The code still isn't working. It now says: "error C2440: '=' : cannot convert from 'Population' to 'int' " on this line: "minvalue = data[startscan];"
#include <iostream>
#include <fstream>...
-
Thank you for your help. I haven't used vectors very much, is there another way of doing that part?
Here is my revised code:
(I'm still having issues, it says that there is a mismatch in formal...
-
Thank you for your help. This assignment is past due, but I am just trying to understand it for future assignments. I updated my code with your advice, but am unsure how to do the array part.
Here...
-
I need some help with this program using the selection, insertion, and bubble sorts. The program needs to be able to do the following:
1. Create an array of 1000 population records when the array...
-
April 23rd, 2014, 10:40 AM
No, I'm not sure what order to place each line to make it work properly. I've tried moving it around and have had no luck.
Thank you
-
April 23rd, 2014, 10:17 AM
I removed the replication of the lines that read from the file and kept them within the while loop and I'm still not getting the correct output. Here are the changes I made.
void...
-
April 22nd, 2014, 09:18 PM
I was able to get some of it working properly but still need help in some spots, which I've marked with comments.
If you could look over it and let me know if I'm on the right track, that would be...
-
April 22nd, 2014, 07:05 PM
I'm not even sure where these cout statements should go or if I have them in the correct spot..
cout << " is being added" << endl;
cout << "The hashed location is " << hashFunc(movie) << endl;
...
-
April 22nd, 2014, 05:05 PM
the program runs but the output is all jumbled up and not displaying in the correct format that the teacher required.
This is what my output looks like if: ( I know I don't have it coded correctly...
-
April 22nd, 2014, 03:30 PM
I'm hoping to get some help with a few things for this homework assignment. I have included the assignment requirements below along with the my code so far. I am having trouble getting the cout...
|
Click Here to Expand Forum to Full Width
|