Beginners - November 2017 (Page 13)

Help with adding health to adventure game c++
 
I know this may be simple and seem like a dumb question but how can I add health to my adventure and display it. The main problem I am having with it is my teac...
[4 replies] Last: Sorry I didn't give my code since my project is extremely big at least... (by phantomxman)
what is -> used for
 
Can somebody explain to me what the following line of code: "this->numberOfLines = numberOfLines;" means and how can I write it in any other way so it does the...
[4 replies] Last: okay, I think it's becoming a little more clear. Thank you! (by wolfie16)
Logical Problem
 
I am working on the tic tac toe program. It was due days ago but I didn't turn it in because it was incomplete (I was having trouble with the function). In the ...
[3 replies] Last: Thank you!! (by Waewkrathok)
How Can I Keep the Memory?
 
Ok so in the code down below I have made a program, the problem is that once I reset the program I need to keep the area's that have already been input. Is ther...
[9 replies] Last: Yeah I know how to use arrays, after further reading of the instructio... (by Lightning Mage)
Issues with AVL tree rotation
 
Ive been working on an implementation of an AVL binary tree and I have the functions working to add elements to the tree properly and I have the rotation and th...
[no replies]
by Elsino
why it prints out jibberish word(junk words)
 
Write your question here. i want to put the words from a file to a dynamic array but when i printed out it prints exactly 4 words but are 4 junk words #i...
[2 replies] Last: It's a result of a bug. You better detect and solve it as quick as you... (by benhart)
getline() return value
 
hi guys I read from this http://www.cplusplus.com/reference/string/string/getline/ and could not find the getline()'s return value I would have guessed th...
[3 replies] Last: this is why you need to return a reference and applies to most input o... (by closed account SECMoG1T)
If statements help
 
I'm practicing writing some codes for a video game. I'm starting off having the player have an option, but the "Choose a Class" part doesn't work. Any ideas? #...
[2 replies] Last: The only issue I see with the code you have supplied is that you are u... (by JayBari)
Recursive Radix Sorting Using Queues
 
I encountered a thread regarding a similar/exact same assignment from last year. It was very helpful in assuring me that what code I do have is close, if not ex...
[1 reply] : It appears no one is ever, going to respond to my question about this,... (by SolaceFiend)
oop
 
How do I create a class (named FileAnalyzer) which accepts the file name of a file to analyze via its constructor? Please help me I'm stuck.
[1 reply] : Your class could look like this: class FileAnalyzer { private: s... (by goldenchicken)
Checking strings for palindromes
 
I've been working on this for a while but can't seem to get it to work. In the checkPalin() function, I write the entire code from prompting the user to input a...
[2 replies] Last: it only prints the first palindrome You need to “clear()” “rev... (by Enoizat)
consuming the /n character
 
Hi guys I was trying to solve a problem for another user and I ended up running into a problem myself haha the problem is with cin when I try to enter a word t...
[15 replies] Last: The easiest way would be to use getline() to get the entire line, then... (by jlb)
cout and cin
 
hi guys I'm just wondering unlike streams that are objects such as ifstream and ofstream how come we don't have to create an object of cin or cout to use them ...
[4 replies] Last: ohh ok cout and cin are already objects created belonging to istream a... (by adam2016)
Index sorting within loop
 
I am supposed to write a program that let the user enter the amount of students => enter the height of the students => sort the height accordingly, female first...
[2 replies] Last: @jonnin thank you so much, i really appreciate your help! (by jayiswho)
Can't Debug Need some guidance [Do-While Loop]
 
Write a C++ function that get two numbers from the user and displays the result of first number raise to the power of second number using do while loop. ...
[4 replies] Last: Thank you Guys but I had figured out a long time ago before you guys p... (by ammar629)
Tic Tac Toe Using Tree-Based AI (Minimax)
 
Hi guys, I am doing an assignment that requires me to use tree nodes and minimax algorithm to make a tic tac toe game. It would be player vs the computer. Eac...
[1 reply] : enum Mark { X, O, N }; // N == empty Mark enum Status {WON, LOST, DR... (by nuderobmonkey)
I'd like to get some help with splitting my main function into different main functions and pass array data to functions.
 
So basically, the main is only supposed to have the file input output. but the lowest, highest, sum and average of all numbers all need to be in functions of th...
[6 replies] Last: Read http://www.cplusplus.com/doc/tutorial/arrays/ (by keskiverto)
Repeating older question
 
Ive asked this question before although now I know a little more. So to restate what I asked. This game works very similar to Plinko. Except every time the ba...
[5 replies] Last: Thanks Yolanda for the help. I'm still on C++14 so dont know if that w... (by donda97)
Dynamically Allocated an Array of Classes
 
I am trying to write a test file that dynamically allocates an array that i use to call the parent and two child classes. They will then call their own print fu...
[2 replies] Last: Thank you so much! I had something like that before but I couldn't get... (by briscoeeee)
Searching CString for certain phrase
 
I'm trying to write a function, findHaHa(), that searches the cstring the user input and returns whether the phrase "ha ha ha" was found. I've looked up how to ...
[7 replies] Last: Repeater, thank you so much! (by clueingforlooks)
November 2017 Pages: 1... 1112131415... 33
  Archived months: [oct2017] [dec2017]

This is an archived page. To post a new message, go to the current page.