Beginners - October 2016 (Page 37)

Beginners c++ multidimensional arrys
 
Hello everyone. I am taking my first c++ class and i'm unfortunately not very skilled when it comes to coding and I am having trouble getting the hang of how it...
[3 replies] Last: Thanks for replying. My code hasn't changed. Im stuck and not sure wh... (by duster420)
Why won't my program with two simple functions run?
 
Curious as to why this won't work. // This program will return true if the user types in y, Y, yes, Yes. Otherwise, if the user types in no, it will retu...
[1 reply] : You are not returning the status value in your user-defined function. ... (by closed account E0p9LyTq)
Simple question. Reviewing
 
This program works and im trying dissect in and understand. But for love of God I cannot figure out why the value returned is 1214 and not -1. I'm sure returnin...
[5 replies] Last: thank you. (by Charlesgb)
Need help inputting values with switch statements.
 
Hello, I'm currently writing a program that determines the cost of a travel based on travel distance, mpg, gas type, and either state (Michigan or Ohio). I am g...
[1 reply] : You can set the prices before the break for each case. (by Hengry)
by Burden
Priority queue
 
How to implement a priority queue on an array and give the order of adding and removing an item with this implementation.
[no replies]
by yakyak
Loop
 
What is the value of n after the following nested loops? int n = 0; for (int i = 1; i <= 5; i++) for (int j = 0; j < i; j++) n = n + j; I...
[2 replies] Last: Thank you @xsimn! :) (by yakyak)
Saving an array to text file! HELP!
 
Had another quick question... I want to serialize my array down and up. But right now I'm having trouble saving my array into 'data.txt' because it only saves o...
[3 replies] Last: Oh? Is there a way to save more than just one line? Not sure if the wa... (by dawnstar)
array of pointers
 
How do i fill in the array of pointers with strings without using dynamic memory allocation? I start to begin thinking that i won't be able to find a way to d...
[5 replies] Last: #include <iostream> int main() { const std::size_t num_strings =... (by cire)
Help with C++ prorgram
 
Hey guys, ok this is my problem: Calculate the exponential power nn. Program prompts user to input a positive integer n less than 10. Program terminates if...
[1 reply] : you get N from the user but then you set N = 1 in line 12. Why get N ... (by SamuelAdams)
by Runal
Beginner programming class cant figure out error
 
Hello. I am taking my first c++ class and our project is to practice using user defined functions by writing a program that converts polar to rectangular and vi...
[1 reply] : Well for one you have a function inside your {} for switch. Line 51 Yo... (by SamuelAdams)
HELP PLEASE!
 
Write your question here. Being very new to C++ i cant seem to figure out why these errors keep happening. i have been working on this project for 12 hours no...
[1 reply] : Seems like a problem on line 53 (by SamuelAdams)
FUnction Help
 
I want to create a function that makes sure the input is positive. Im not sure if i am on the right track. #include <iostream> #include <string> #include...
[2 replies] Last: I tried this but im not sure why its not working. #include <iostr... (by fivestar)
by rantiv
Plinko simulator!
 
Just a heads up, I'm going to be needing a lot of help! So we are making a program that simulates plinko. There is just a lof of styling that is making it a lit...
[1 reply] : Ok, I've ran the code. There is one thing that I found weird and har... (by Hirokachi)
Operator Overloading Confusin
 
Hi guys! (No, I'm not positing homework, I'm just confused with a concept. I wanna be able to overload a -- function. I had ++ example that looked like th...
[no replies]
Reading from input file and writing to new
 
I am trying to write a function that will read the numbers from an input file, take the sum of the numbers divisible by 2 and 5, and then output that sum into a...
[1 reply] : your while loop is the problem. (by SamuelAdams)
by Alex A
how to add military time into an integer number
 
Hi guys, below is part of my code that I'm having issues with. I prompt the user to enter a time between 600 and 2200 in military time and then i need to fi...
[9 replies] Last: @Alex A Ideally, you should make sure that endtime is greater than st... (by whitenite1)
Array not starting where I want
 
Thank you guys!
[2 replies] Last: The simple way is to, when reading input from the user to index into t... (by Zhuge)
Functions
 
***
[10 replies] Last: *** (by Ragnarok314)
Bool Problem
 
I need help figuring out why my bool statement isn't working. It should output "Is a palindrome" or "Is not a palindrome". However, it currently is outputting A...
[2 replies] Last: sounds good. Got it. (by salomonthesav)
Menu Chooser loop
 
How would I use a do while loop or a while loop to only repeat vases 1-3, and default; and exit when case 4 is picked. // Menu Chooser // Demonstrates the ...
[1 reply] : int choice = 0; while(choice != 4) { cout<<"Choice: "; cin>>... (by closed account LA48b7Xj)
October 2016 Pages: 1... 3536373839... 51
  Archived months: [sep2016] [nov2016]

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