Okay, that's uncalled for and not really fair. I was a beginner and basically a n00b. You shouldn't insult me just because I was first starting c++. Everyone has to start somewhere, you know. It was...
Type: Posts; User: Crcullen3916
Okay, that's uncalled for and not really fair. I was a beginner and basically a n00b. You shouldn't insult me just because I was first starting c++. Everyone has to start somewhere, you know. It was...
Is there another way to get rid of the newline character, like cin.ignore or something like that?
I'm doing an assignment where you have to create class structures. The problem I'm having is when you read in a string into the array. Here is my program so far:
#include <iostream>
#include...
Thanks I fixed the first part by using getline() but how would I convert the strings read to ints for year and pagenums?
Hi, I am doing a assignment in which I have to create classes to store information about my books. However it is not working because I am getting crazy output and I don't know what's wrong. I keep on...
I am having trouble with finding and erasing part of a string. For example, the string "pork and beans". We had to find the first occurrence of "and" and place "not" after the "and" to make it "pork...
I haven't learned maps yet. I looked it up and it's way past my level. I think I'll wait on this one, maybe talk to my professor, it's optional anyway.
I am trying to find the mode, or the number which occurs most often, of my array. This is the scores array, which is sorted:
820
987
1000
1020
...
Okay, I know this is probably really simple. I know how to find max/min in an unsorted array, but what about if the array is sorted? Is it the same thing as this, in an unsorted array:
int...
Thank you all, I didn't realize that I didn't call the function at all, can't believe I didn't see that :rolleyes:
I reversed the less than sign, so it works good now
I think there's something to do with the rest of the program:
#include <iostream>
#include <fstream>
using namespace std;
ifstream file_in;
const int SIZE = 25;
void readdata (int [], int...
Actually it compiles but doesn't sort...
Oh! I didn't see that, thanks it works now
I'm trying to use a bubble sort in my function, but I keep getting a message saying "Invalid types 'int[int]' for array subscripts"
So it won't compile. At least the switching of the second array...
Thank you so much, I got it right now :)
I have another problem I've spent a long time trying to solve. I know it's probably really simple but I cannot get it to work.
Here's the problem:
Write the definition of a function powerTo ,...
I've tried and tried to solve this problem, but I cannot do it. Here is the question:
Write the definition of a function, isReverse , whose first two parameters are arrays of integers of equal...