Beginners - April 2017 (Page 11)

Explain this code please (newbie)
 
Hello, I'm writing a pathfinder, I'm following Amit's A* pathfinding tutorial, I've been trying to make sense of the search function below and commented what I ...
[1 reply] : Hello Chris, What code? There is no code in the message I see. And re... (by Handy Andy)
Placing Explosives (using GetAsyncKeyState)
 
Hey everyone. I was given an assignment to create a game where a player moves around a 'construction site' with some obstacles on it. The player will need to pl...
[1 reply] : Hello NeonNovel, Based on what you have lines 6 - 25 will work just a... (by Handy Andy)
How to properly overload >> input operator?
 
I am trying to overload the >> operator. I want to use my object called testcase1 and initialize it with the overloaded >> operator to set the month number (1-1...
[9 replies] Last: kemort and coder777, You guys helped tremendously. It is a lot cleare... (by MisterTams)
Connect4 Game
 
I'm working on an assignment using classes to create a Connect4 game. The classes themselves were created by my teacher and I only have programmed the main func...
[1 reply] : HA. nevermind found my stupid mistake. (by gubhaus)
setw
 
Hello, I just needed help on spacing between columns. What is the easiest way to do that? I need to create like 10 spaces between the first row and then 2 spa...
[3 replies] Last: Thanks guys! (by alextexasfan12)
Validating user input
 
I am looking to validate user input in my program. I used an if else statement but I do not think I am using it correctly here is my code. #include <io...
[3 replies] Last: Are you experiencing any problem? BTW, what about simplifying your cod... (by Enoizat)
how to use combination iin loops
 
Suppose you give a dinner party for six guests, but your table seats only four. In how many ways can four of the six guests arrange themselves at the table? Any...
[1 reply] : can any one here who can do this problem yes, there is such a perso... (by gunnerfunner)
Need help on arrays
 
How would I modify this code appropriately using arrays? #include <iostream> #include <cstdlib> #include <ctime> #include <iomanip> void eggOdds...
[2 replies] Last: Hello sir jeffers PLEASE ALWAYS USE CODE TAGS (the <> formatting butt... (by Handy Andy)
Structures
 
I need help with this program Whenever I compile it I can run it and enter the name of the employee and the first price but then it just jumps to the other two...
[6 replies] Last: Your for loop runs 10 times, but the code within it reads into the sam... (by dhayden)
c++ check please help
 
3) We would like to write a check. Input the following: Date, Payee, Amount, and the account holder. Output these in the following format, but the amount n...
[2 replies] Last: Eight Hundred Eleven and no/100s Dollars That's the only tricky part... (by Enoizat)
search benchmarks
 
book question: Write a program that has an array of at least 20 integers in a array in ascending order. It should call a function that uses the linear search ...
[1 reply] : the user to be able to enter as many numbers as he or she wants You... (by Enoizat)
unique_ptr
 
Please can someone help me this question. The answer is probably obvious but here I go... Why is line one ok, and not line 2? std::unique_ptr<int > myP...
[4 replies] Last: Thanks very much everyone, you have been a great help. James (by jamesfarrow)
by Fey
Random generator help
 
hello people, just wondering if anyone can help me to understand why my code doesn't somewhat work which it prints numers outside of range. I want to print fo...
[1 reply] : How come this works This doesn't work. Your code is a bunch of compi... (by Pattako)
closed
 
solved
[3 replies] Last: http://www.cplusplus.com/forum/general/213776/ (by closed account 48T7M4Gy)
Class definition of an Item class.
 
My objective is to write the code for the class definition of an Item class. The main() function should create an array of 5 Item objects. Then the main() must ...
[1 reply] : there were various missing/misaligned braces in your program, this is ... (by gunnerfunner)
by nkman
Segmentation fault on queue
 
I tried following the queue headers from /reference/queue/queue/front/ , this code gives the expected output but crashes at the end. Why is it crashing? #...
[2 replies] Last: In lines 27, 29 remove the semicolon if (tmp->left) // ; **... (by JLBorges)
Too many arguments
 
#include<iostream> #include<iomanip> using namespace std; int main() { double loanPayment, insurance, gas, oil, tires, maintenance; double monthlyTota...
[2 replies] Last: Threw it in VS 2015 and it ran good. Sorry, not sure what the problem ... (by joe864864)
Changing value in a two-dimensional Array
 
This is my code so far, and in seat_available(seatingArray), I am trying to get values that have already been passed through, changed to "X", and have the "X" r...
[1 reply] : Shouldn't each element of seatingArray, representing a specific seat, ... (by gunnerfunner)
Having trouble with Random Access Files
 
I will start with posting the instructions that out professor gave us so there is no confusion on what I am trying to accomplish. You are the owner of a hard...
[5 replies] Last: Okay, so I made a new solution and source file just to cover both. It ... (by Shep5158)
Error
 
Need some help been getting a too many arguments error What compiler are you using?
[no replies]
April 2017 Pages: 1... 910111213... 34
  Archived months: [mar2017] [may2017]

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