No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hmmm...I completed my console hangman game last night and it was working fine. I got up this morning and fiddled with it a bit and must've done something I was unaware of and slightly broke the program's ability to recognize either the answer guessed was correct or not. It prints … |
|
Hi all, Ok, so I am new to C++ and whilst I understand most of the theory, I am still struggling with the practical applications! I'm trying to write a program that will allow a user to enter 10 whole numbers, then return the sum of all 10 numbers, the … |
|
Hey. Thanks for all of the help with my other questions. This forum has been very helpful. In this program, there is a note: "chocolate" may refer to either the ice cream or the sauce; assume it refers to the ice cream if an ice cream flavor has not yet … |
|
i have an array weights[16][60] this being 16 rows of 60 elements in each one i have another error[16] which co incides with each with the 16 rows, this is the error from each row. is there a way i can put each of the 16 in order in the … |
|
I need to create a Space Invaders kind of game and I have a demo I need to copy the main features from. The invaders have to be of at least 3 different types and they change color. So I figured the invaders are 3 child classes from a parent … |
|
I am creating a linked list which links a struct of data together. However, this is my problem, if I declare struct Node first then the Event type wont exist, but if I declare struct Event first then nodePtr wont exist....im kinda stuck here as to how I should declare … |
|
I am trying to create a Space Invaders sort of game. I am using a linked list for the bullets that the player shoots and in the same list, there is also the enemies. I have a addNewEnemy Function which I run once in the main game loop. This adds … |
|
hey, this program is supposed to calculate fractions, and I feel that I have most of the code down, but I can't get past the fractions.cpp:50: error: expected primary-expression before 'char' error, its probably something misicule, but I can't get it for the life of me. The error is in … |
|
I have to convert this program that I wrote to use switch case statements to handle user input (+, -, /, *, X). Any ideas? [code]#include <iostream> #include <string> using namespace std; int main() { double total = 0, counter = 0; char sign, X = 0; double value; do … |
|
Alright I have been working on this game for like a week or 2 now, but I am having some trouble towards the end. Heres the code I have gotten so far: [code=c++]#include <iostream> #include <ctime> #include <cstdlib> using namespace std; char play; int guess; bool done; int noOfGuesses = … |
|
im making a program where i will displaying the sales of each store using a sales bar chart. user will input sales for each store. after the input, a sales chart must be displayed using a for loop, with each '*' = $100 in sales question: how can i make … |
|
im quite new to code and are using c++ to read files. Through some examples i have managed to read a file from top to bottom like this. The problem is that i will need to read the file from bottom to top instead. Is there a reversable method for … |
|
Oooookay...this is really strange. I'm working on a program in MSVC++ 9.0 and it works fine when I hit "play" in the development environment, but when I manually navigate to the debug folder and click on the program, windows vista pops up an error saying that my "program has stopped … |
|
I did all the coding, and I think that it is correct, but I dont understand why the program does not output the prime numbers!!! [code=cpp] #include<iostream> using namespace std; int main() { double newn; char ans; do { cout << "This is a program that will help you find … |
|
please tell me algorithm or code for following character sorting (Ascending) problem. For example Text file contains following data: 001, PSTR, abcdef, h.no.222 abcdefghik lmnopq rstuv, student, A-level 002, MKTO, abcdef, house. 2 abcdefghik lmnopq rstuv, student, rtv 003, LORR, abcdef, h.number.210 abcdefghik lmnopq rstuv, student, O-level 005, ASMP, abcdef, … |
|
i have a machine problem to do. it should compute for the average grade of N scholars. N will be entered on the keyboard and the Student No. and Grades of the Scholars in *8 Subjects will be entered. sample output of program should be like this. STUDENT NO. S1 … |
|
Hello, I'm trying to simply copy the text from one .txt and create a new one and copying it to a new txt. I'm actually adding more text to that new file but that's not the part I'm having problems with. I could go through the entire .txt with this … |
|
Hi guys... I'm a student having a bit of trouble with my assignment. The assignment is to make a program for a phone company to calculate call durations, costs, discounts etc... I need the user to input call start time in 24 hour style... and end time. In order to … |