No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi all. I have code that looks like this: [CODE]void bubblesort (int arr[], string stringarr[]) { for (int i=0;i<5;i++) { for (int j=0;j<i;j++) { if (arr[i] > arr[j]) { int temp=arr[i]; arr[i]=arr[j]; arr[j]=temp; string strtemp=stringarr[i]; stringarr[i]=stringarr[j]; stringarr[j]=strtemp; } } } }[/CODE] It is a bubble sort trying to find the … |
|
I am trying to use a linked list to read in data, do calcuations and then display it. I am new to using linked lists, so right now I'm only trying to display them to see if it works. [CODE]#include <iostream> #include <fstream> #include <iomanip> #include <list> using namespace std; … |
|
I have a program where it reads 2 files, one of them containing a file with customer number (int), customer name (string) and balance (double). There are 7 lines, but my program would only read the first line 7 times. This program is confusing me as to why they won't … |
|
I have this assignment where I'm supposed to read in a text file and assign the values to a vector and sort them out. The text file has values for country, population, birth rate, and death rate. An example is: (not realistic numbers) USA 400000 5400 3200 Canada 56000 3400 … |
|
I have a program where I'm supposed to have someone input a word and I have the program leave the first and last letters stay while everything else becomes randomized. I pretty much have the program working, but I don't know how to ignore the first letter. This is all … |