Forum: C++ 28 Days Ago |
| Replies: 2 Views: 256 I have the following code that tests a string to see if it is a palindrome. The only error I am getting is when I try to pass each character to the queue and stack. Is there another way to pass it to... |
Forum: C++ Mar 25th, 2009 |
| Replies: 2 Views: 338 I have the following program that declares 100 Book objects... The way that I have it now, each item in the array is set to a default value. Is there a way to add only the items that are input by... |
Forum: C++ Mar 25th, 2009 |
| Replies: 7 Views: 748 OK, I think I have the sort... Now im having problems with the search, if I cannot get it to return the index... It returns -1 every time....
#include <iostream>
using namespace std;
#include... |
Forum: C++ Mar 24th, 2009 |
| Replies: 7 Views: 748 closer???
void selectionSort(Book bookList[], int SIZE)
{
int a, b;
Book temp;
for (a = 0; a < (SIZE - 1); a++)
{
bookList[b] = bookList[a];
temp = bookList[a]; |
Forum: C++ Mar 24th, 2009 |
| Replies: 7 Views: 748 Ok, thank you am I getting closer with this...
void selectionSort(Book bookList[], int SIZE)
{
int startScan, minIndex;
string strName;
for (startScan = 0; startScan < (SIZE - 1);... |
Forum: C++ Mar 23rd, 2009 |
| Replies: 7 Views: 748 I understand how to search and sort an array of int type. However I am confused how to sort/ search an array of object's in which I sort/search by a string in the object. (alphabetically) Here is the... |
Forum: C++ Feb 20th, 2009 |
| Replies: 2 Views: 374 Why is this array not printing in 2D?
#include <iostream>
#include <iomanip>
using namespace std;
const int COLS = 5;
const int ROWS = 5;
void showArray(int [][COLS], int);
void... |
Forum: C++ Feb 17th, 2009 |
| Replies: 3 Views: 376 I have the following array that prints out the amount of rainfall for each month, and then uses a bubble sort to sort it in ascending order... How can I display the name of the month along with the... |
Forum: C++ Oct 28th, 2008 |
| Replies: 4 Views: 372 The assignment calls for me to find the area with the fewest accidents (north, south, east, west, central) in a city. I am to write two functions:
-getNumAccidents() is passed the name of the... |
Forum: C++ Oct 28th, 2008 |
| Replies: 4 Views: 373 Is there an easier way? The assignment wants me to use one function to get the number of accidents in five areas from the user, and use another to determines which has the lowest amount of accidents... |
Forum: C++ Oct 28th, 2008 |
| Replies: 4 Views: 373 If i have 5 int variables with values stored in them, is there a command to find the lowest valued variable? |
Forum: C++ Oct 21st, 2008 |
| Replies: 3 Views: 368 Ok, that makes sense thank you! |
Forum: C++ Oct 21st, 2008 |
| Replies: 3 Views: 368 The following program is a game in which there is a pile of coins. When the loop runs two players take turns removing coins. Whoever gets the last coin wins the game. ... How can I get the looping to... |