Beginners - April 2017 (Page 13)

by Boanc
How to implement an attack ?
 
Hey ! I have a question, I'm making a Dragon Ball Z SFLM(2.4.2) game and I want to implement : If the Player pressed "Z", the attack(Projectile) will trigger...
[no replies]
Issue with sorting a vector of class objects using bubble sort
 
I am trying to create a vector of class objects, sort the vector using bubble sort and then eventually print the sorted vector in a table format with the area o...
[3 replies] Last: Retrieve the radius using the get radius function and compare them. Yo... (by TheIdeasMan)
Class inheritence guide
 
what does the lines i indicated do? class A { protected: int y; private: int z; public: int x; A(int a, int b, int c):x(a), y(b), z...
[3 replies] Last: Yes, but better. Classes get their member variables initialised befor... (by TheIdeasMan)
by const
How to accept a full name with spaces
 
So this is a pretty simple question, I just can't find info on reading in a string which has a space using getline. The syntax I've tried for my program is get...
[4 replies] Last: remove the newline character from getline() else it's left in the inpu... (by gunnerfunner)
Help with bool
 
A vending machine serves chips, fruit, nuts, juice, water, and coffee. The machine owner wants a daily report indicating what items sold that day. Given boolean...
[2 replies] Last: #include <iostream> int main() { bool chipsSold = false, fruitS... (by gunnerfunner)
Array problems
 
Hi, all. I'm having some trouble with using an array in a program that I'm working on for class. The specifications call for a program that asks the user to inp...
[3 replies] Last: #include <iostream> #include <iomanip>//std::setw: http://www.cplusp... (by gunnerfunner)
Iterator help
 
Could someone tell me why this is invalid with a list? This function worked fine with a vector so I'm a bit confused as to what went wrong. Here is the functi...
[3 replies] Last: To print a space after every item except the final one, with any (inpu... (by JLBorges)
doubly linked list
 
Hello! I have made a doubly linked list that functions as both a stack and maps a character to a long and have a few questions about the program i wrote. the l...
[15 replies] Last: I saw the doubly linked list as a more natural choice for the job i n... (by TheIdeasMan)
Need help
 
Write a program that asks the user to type a sentence into the command prompt. If the user typed the word "exit" or "Exit" (without quotes and all lower case), ...
[3 replies] Last: Thank y'all both!! That worked!! (by Grichards16)
Need help
 
#include <iostream> using namespace std; int main() { double purchase = 52; double statetax = 0.04 * purchase; double countytax = 0.02 * purchase; double t...
[2 replies] Last: Okay caused when i use source lair i get that error that pops up (by Boiboiboi31)
class inheritence help
 
first i put user inputs in to a class i want to put these input into my derived class /////////////////base class////////////////////// hehehe::hehehe(int& ...
[no replies]
How can I display my object of my class?
 
Hello, Been working on a problem using a class and friend function to convert polar coordinates into polar ones. I just cannot see why I cannot display the ...
[3 replies] Last: Hello, Thanks again! All working smoothly! (by Shishykish)
Create a window and change it's position every x seconds.
 
Write your question here. I have created a window with CreateWindowEx and I added a loop at the botoom of the program to move its position every 1 second. But ...
[1 reply] : A better way is to use a timer. https://msdn.microsoft.com/en-us/libra... (by Thomas1965)
Counting Pos/Neg/Zero Numbers in array
 
Ok basically the program is supposed to count all the positive, negative and zero numbers in the array. I tried to do it but the outputs is 0 for all positive, ...
[5 replies] Last: check line 15 there (by wildblue)
by egio
How to create nodes directly through constructor? (Binary Search Tree)
 
Hello, I created a binary search tree with a three-parameter constructor below, however I misunderstood my assignment because I was apparently supposed to "c...
[2 replies] Last: Hmm.. So you're referring to: 63: Node* temp = new Node(data, nullpt... (by egio)
Unsigned integer in loops
 
I would like to know why the first loop works meanwhile the second doesn't. I also would like to know why both loops end, for me, they should be an infinite loo...
[8 replies] Last: I know what the 2 complement is, but why use it on unsigned integers i... (by Oriol Serrabassa)
Longest Common Subsequence Problem
 
Ok, so I was going through the Longest Common Subsequence problem in CLRS, and I understand it for the most part. What I don't understand is why it is so needle...
[12 replies] Last: Oh snap! Didn't even realize that. Okay, I was wrong, I should have co... (by Arslan7041)
what does a 3D vector look like?
 
if 2D vectors is rows and columns how bout 3D vectors? example like dot product and cross product how is the variables from a dot product or cross product s...
[3 replies] Last: http://en.cppreference.com/w/cpp/algorithm/inner_product (by closed account 48T7M4Gy)
by Aandb1
Vending Program Help
 
Hello, when I run this program I am getting an error on my ValueOfSnacks functions stating s1 - s4 weren't declared in scope. I am really confused as to how I a...
[3 replies] Last: My primary question revolves are outputting the snack price over into... (by AbstractionAnon)
by logana
Two basic questions on this Array example: on C++
 
This code is a basic entry Array, and is from a tutorial and doesn't quite work properly because the "-1" when typed is pointless and the Array still prints i...
[3 replies] Last: Thanks Andy,I will take that all on board. I think the "-1" is kinda p... (by logana)
April 2017 Pages: 1... 1112131415... 34
  Archived months: [mar2017] [may2017]

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