Beginners - November 2016 (Page 41)

Am i implementing this maze program correctly?
 
I am attempting to write a program which will solve how to get out of an array maze. Im not sure if I am implementing it properly.It compiles fine but im not su...
[13 replies] Last: Possibly more out of interest than anything else. But it does show how... (by closed account 48T7M4Gy)
by Boun
Help with while loop
 
Write your question here.For my code, multiples of 5 should be changed to Humpty, multiples of 7 should be changed to Dumpty, and multiples of 35 should changed...
[1 reply] : cout << counting; cout << endl; counting++; if (counting % 35 == 0) {... (by SakurasouBusters)
"contains" function for BST
 
Hello everyone, I was practicing implementing BSTs from scratch and wrote a "contains" function. The function basically takes in a value and the root and return...
[2 replies] Last: @mbozzi: Thank you! Just dereferenced the right and left sides and it... (by MikeCheezy)
by cm123
if else loop
 
keeps failing and i don't know why. can some one please help me? //Write a C++ program to get the input of number of tickets for an amusement //park. Each ...
[2 replies] Last: if (numOfTickets < 5){ discount2 = 0; } if else (numOfTickets > 4 && ... (by SakurasouBusters)
by Bored
Do you think it's lazy of me If I write code, to write my code?
 
So an example of my lazyness would be whats below this #include <iostream> #include <string> int main() { int letter(0); std::cout << "Please type in a numbe...
[3 replies] Last: @Nico If you have a repetitive task it is good to think about more e... (by Bored)
Segmentation Fault with file I/O
 
Hello, I am writing code for a project where the user chooses a year of popular baby names and a file is selected for the user. It is formatted like this... 1 J...
[3 replies] Last: Hey I got it to work. Thank you guys so much for the help! Apparently ... (by closed account 92yp4iN6)
by Zorai
Writing numbers from a generated list to a text file??
 
Hello, I am working on the following exercise to build my C++ skills: "Write a program that will generate 1000 random numbers (all of which are between 10 and ...
[7 replies] Last: #include <iostream> #include <cmath> #include <cstdlib> #include <ct... (by joe864864)
How to use cin.clear ??
 
Hi, I'm working on my school project and having an issue with using cin.clear. I want the users to input only the number (choices of 1,2,3 or 4). Below is the...
[1 reply] : Put your code in code brackets so its easier to read. (by joe864864)
by cm123
ticket prices - some errors so it doesn't run
 
trying to get it to run 12 times.please help!! //Write a C++ program to get the input of number of tickets for an amusement //park. Each ticket costs $ 5.50. ...
[1 reply] : What are you doing with: numberTickets(1, 12); (by joe864864)
Can my source code be condensed?
 
Hello world! This is my first discussion on this forum, so I'm a bit nervous. But could someone please help me revise the following program that I wrote for my ...
[9 replies] Last: Yes. Thank you! (by JLBorges)
error
 
i keep getting this error through my program error: expected ‘,’ or ‘...’ before numeric constant the line that is getting this one is int search (...
[2 replies] Last: ok that solves the first error so how can i solve the error: expected ... (by dingfuttsie)
Main Linker Error
 
I'm getting a architecture x86 error and it says main linker failed, does anyone know what this means? I don't have the code with me, my file got deleted.
[no replies]
How to make a loop for 3 possible outcomes
 
I am wanting to have a loop which runs back to the beginning of the program if the player enters 'Y' to play again(I need it to go back to the Display() functio...
[no replies]
by Etaoti
Output issue
 
Hello experts, I am fairly new to this forum. I need help with understanding the output of the following program. the outcome is: "sum = 22.61 function 1 = 6...
[4 replies] Last: Some cleaning: line 6 is not needed because function1 is implemented b... (by Nico)
[homework] Need some Help array and data file
 
so i have a couple of errors but my main question is using one data file to read into two different arrays. In my code i have a data file that is a list of baby...
[1 reply] : Quick demo how to read the file into the arrays, maybe you can adopt i... (by Thomas1965)
postfix evaluation with two digits
 
hey guys. the code works for single digits only but not for double digits. i researched and they said i need a seperator but i think i already have that for if ...
[1 reply] : You need to change the isdigit() condition so it just add the digits t... (by andywestken)
I'm having trouble with my code
 
So I'm, trying to code a program that codes your message into a secret one. My problem in this code is that it crashes in the for loop. So the program asks you ...
[4 replies] Last: ok thanks for all the help I appreciate it! Because of you, I finished... (by JoJoTag306)
Specify a fixed length of int
 
Hi Im writing a program that check if a number is a palindrome or not. The problem I have is that I need to set a fixed length to the integer, i.e. 5. So when t...
[1 reply] : if( (num / 10000) == 0 ) { // not enough digits... } if( (num / ... (by booradley60)
by johnR
Help reading obscure (to me) piece of code
 
I'm trying to debug a C++ program that I use (but didn't write). I can read plain C reasonably well but the C++ syntax below has me stumped: pbuf [ j ].mi...
[3 replies] Last: Thanks for the replies. They answer my question perfectly. (Now feelin... (by johnR)
vectors and card dealing
 
Hi - I written some code that has a class card and clas DeckofCrads. So far I have managed to create the deck and print the deck, then shuffle the pack and prin...
[12 replies] Last: Thanks gunnerfunner I really appreciate you taking time to help me. I ... (by jamesfarrow)
November 2016 Pages: 1... 394041424344
  Archived months: [oct2016] [dec2016]

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