Beginners - October 2016 (Page 19)

Number Guessing Game, but game plays with out player...
 
I am programming this Number Guessing Game to work on my skills, the only problem? Is that the game runs all the way through after starting with out player inpu...
[4 replies] Last: If your compiler uses C++'11 or more recent you can use sleep_for #i... (by closed account ybf3AqkS)
Accessing Elements of Vectors within Vectors Involving Class Point
 
The program is suppose to store a hand of 7 cards each for 5 players after which each player must remove a card and pass to the next until all of a player's car...
[no replies]
Passing function name in command line argument
 
How do I pass an argument value from the command line as a file name? For example, if argv contains the text "transplantPatient.txt" would the code for d...
[2 replies] Last: You can also use argc to check how many command line arguments there a... (by closed account ybf3AqkS)
Strange bug in program.
 
I've written a code to remove the vowels in a sentence. It mostly seems to work, but the remove function strangely begins to ignore certain vowels, and take out...
[5 replies] Last: You are correct, thee substr is a distraction. But the program needs a... (by TuxedoJack)
Class Invoice get functions won't populate
 
Hello all. I have to write/modify two C++ programs for class, and I am lost on both of them in about the same spot. Hopefully if I can get help with just one ...
[1 reply] : Oh, and lines 29 and 106 are the start points of the next programs. (by geraldgodwin)
Help for homework
 
Hey guys , I'm just a beginner in C++ programming. I just started couple month ago and I need your help. I have this project for school and It would be amazin...
[3 replies] Last: I was thinking the homework was to describe each line of the code vs t... (by SamuelAdams)
Destructor or Pointer Issue - Storing Binary Trees in a Vector
 
Hi, I am working on a personal project that requires storing binary trees in a vector. I can store them correctly and perform operations. The only issue is that...
[3 replies] Last: Hi thank you for your help. That seems to be a copy constructor? Doesn... (by nbstrong)
HELP ASAP: Finding odd numbers in array
 
I have to display the number of odd numbers in my array. So the user inputs 2 index's from 1 to 14 and the function in my code outputs the number of odd numbers...
[5 replies] Last: Sweet.Thank you so much! (by salomonthesav)
Is there a way to get run-time random numbers?
 
Ok so this isn't as much of a there's a bug in my code problem as it is a how do I even do this problem. The problem is that I need some form of algorithm to ge...
[2 replies] Last: Here is another way #include <iostream> #include <random> #include <... (by closed account ybf3AqkS)
Rotate an array to the right by a given number of steps.
 
Hello The following code snippet is serving the purpose, but not fully I guess - it is supposed to shift each element of the array to the right by K number ...
[1 reply] : Don't shift K steps; shift (k%A.size()) steps. That is, if the size... (by Repeater)
Error in constructor (inheritance)
 
I am getting an error when I try to do the Square::Square constructor call. error: expected constructor, destructor, or type conversion before '(' token Sq...
[3 replies] Last: This has been figured out. Thanks for the help and advice! (by kigoral)
word sort
 
I have a homework assignment and I can't figure it out.. new to c++ You are given a series of words separated by spaces, and ending with a . Your output sho...
[no replies]
Reading text input from .lbf files
 
Hiya there everyone, I'm very new to C++ and am trying to figure things out as I go along. I have code for a program I have already made where it reads text inp...
[8 replies] Last: If you're careful you can reuse a stream for multiple files. #inclu... (by jlb)
While Loop with division
 
I'm having issues with the division section of my code. When I run the code for the decimal(answer) I'm getting 1.00 across the board. When user enters the numb...
[1 reply] : What do you try to achieve on line 20? Integer division produces inte... (by keskiverto)
by Xieni
Game Entrance Help
 
Hi guys, can anyone help? I'm struggling with, in the beginning of the game, where it says "Press X to join game" how can, if someone were to say press 'B' how...
[no replies]
by Xieni
C++ Puzzle of Death Game (UNFINISHED)
 
Hey dudes here is half of my unfinished game: The Puzzle of Death, please update with any questions, or help. I will continue posting as my game becomes better,...
[1 reply] : New version coming soon.... (by Xieni)
Do-While loop invalid input issue
 
Hey all, I have this rock paper scissors code that keeps repeating while the user picks 1 2 or 3. Pick a letter get error code and exit, pick another number ge...
[1 reply] : I am having trouble understanding why cin takes 1w as a 1 then a fail... (by AbstractionAnon)
Inserting a variable randomly into a vector
 
Hi I am a novice programmer and was trying to insert a variable into a vector using the rand() function. I have written code (below) which prints out a vector ...
[4 replies] Last: You never call srand() to seed the random number generator. http://ww... (by AbstractionAnon)
Coin Toss using Function
 
Hello I am trying to a simple coin toss program using a function. I have seen similar ones done by other users and I created this one as practice for my c++ cl...
[2 replies] Last: LOLLLLL, Thank You, for some reason I have trouble catching small stuf... (by CodeWarrior20)
do-while loop
 
Hi all, I'm trying to get the do while loop here to repeat but I can't get it to and I can't figure it the problem, it just ends after the last cout. ...
[3 replies] Last: I replace the && into || which made it repeated and then I did have to... (by HumCH12)
October 2016 Pages: 1... 1718192021... 51
  Archived months: [sep2016] [nov2016]

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