No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
12 Posted Topics
Hello, I've attached my code, I keep getting the Debug Assertion failed, Expression: string subscript out of range error I can't find any errors in my logic and code for the functions, but obviously something is wrong, no matter where I put breaks, i still get the error when debugging. … | |
Hello, I've written a knight's tour program and handed in a working version of it already using a bunch of if statements for each possible move. I really wanted to use a couple of arrays for the moves and consolidate my code more, but I ran out of time. I … | |
I'm getting an eofbit exception when I run this function. I'm not sure where I've gone wrong with setting this function up. Can anyone tell me what I've done wrong here? I would really appreciate ANY advice. void loadFiles() { ifstream file; file.exceptions ( ifstream::eofbit | ifstream::failbit | ifstream::badbit ); … | |
Hello all, I am trying to finish this program, but am running into some trouble with the main() (I think). It will output the courseID, but no grade, points, honorPoints, or averages I think that I have everything overloaded correctly, but am messing up with the array of objects part … | |
Hello all, I've been writing a multiple choice question version of the game Hangman. I've got it done except for stopping already asked questions from appearing again. I've got the 'asked' question numbers (the questions and answers are read in from a file into various arrays) added to a vector … | |
I'm writing a program creating a card game of war. I (think) that I have the majority of it done, but I cannot seem to figure out how to split a deck into two separate hands in a Hand class. My code is in components, I have a Deck, Card, … | |
I'm writing a program that takes an input string and gets the length and/or gets the number of vowels and consonants in the string. I've gotten it working except for consideration of spaces (which are allowed) and error checking for input other than letters. Here is what I've got so … | |
Hello all, I'm writing a program that gets an input string entered and I was wondering if there is an exception thrown so that the string is valid only if it is all letters. I can find exceptions thrown for only doubles, int.... as valid input but none for only … | |
Hello, I'm almost done with this program, but when I want to sell an item (option 2) I get an error after I enter how many 'vector subscript out of range'. The program compiles correctly, but I cannot for the life of me figure this one out. Any Help? [code] … | |
Hi all. I'm having a minor problem with cases in my program. If I enter a number that is out of my case range (say I enter a 10 when there are only 4 cases) I've got my default to output an error prompt. When I enter a character, say … | |
Hello again, I'm trying to finish a function I am working on that reads data from a file set up like: itemID itemName pOrdered manufPrice sellingPrice itemID itemName pOrdered manufPrice sellingPrice ....and so on and puts the data into vectors this is what I've gotten so far and I'm not … | |
I'm working on a program that reads a file of scores and then outputs the number of scores in certain ranges. I've got it to read the input file (scores.txt) which is set up as follows; 76 89 150 135 200 76 12 100 150 28 178 189 167 200 … |
The End.