Beginners - February 2016 (Page 14)

Shipping charges assignment
 
Below are the rules everything works except the segment modulus formula isn't working which is causing the code for the total cost to not calculate. Also set pr...
[4 replies] Last: Thanks for the help TarikNeaj! (by SiliconPatriot)
Vector Insert Program
 
Why is the "it" iterator no longer valid after line 13? // inserting into a vector #include <iostream> #include <vector> int main () { std::vector<int> m...
[3 replies] Last: Ok thank you guys for clearing that up. (by DoABarrelRoll94)
Rock Paper Scissor Lizard Spock BOOL Won't End Program After Win/Lose
 
I am attempting the Rock Paper Scissors Lizard Spock program and believe I have everything working correctly except I cant seem to get BOOL to work are there an...
[4 replies] Last: Lines 83-94: Regardless of what the computer selection is, you always... (by AbstractionAnon)
String Array problem
 
So I have two issues I cant seem to figure out the first one is when I run my program once it works fine but when they click "Y" to run it again it only lets th...
[no replies]
Determine grade from tests scores entered
 
I'm pretty new to c++, and I've been trying to fix a few quirks with my program that is able to determine someone's grade by using while loops. The program need...
[no replies]
generate lottery number(S) between 25-75
 
Trying to generate series of 10 random numbers between 25-75 for like lottery ticket. allowing the computer to pick random numbers every time... I know i'm mis...
[11 replies] Last: Your conditions should be &&, not ||. Also check your conditions (<, >... (by AbstractionAnon)
Error: redundant redefinition of arguments
 
Hi all, I'm making a library with functions that validate a user's input and returns it if it's valid. I'm encountering the same debugging errors, "Redundant r...
[2 replies] Last: Thank you! To fix it, I just switched around the parameters so that th... (by CrashNebula)
by nj1995
converting to vector
 
Hi, I am struggling to convert my program to use vector instead of string, I would appreciate any help/guidance on how to do this. Thanks! #include <iostr...
[2 replies] Last: yeah it is an assignment i managed to get it to work using vector stri... (by nj1995)
array range specified by user?
 
So this code is supposed to take a range from the user and process an array in that range. Then it is supposed to output it backwards and only the positive numb...
[2 replies] Last: thanks for your help!! works perfect now :) (by misslyss)
brain jogged...quick help please
 
Once the user selects the proper membership, why can't I get the correct rewards (display function) to print?? #include <iostream> #include <iomanip> ...
[3 replies] Last: fixed the global reward variable, should i pass the points variable t... (by TarikNeaj)
Print out even numbers with while-loop
 
I am trying to write a program that prints out the even numbers between 1 and 21 using the WHILE loop. This is what I have, but there is no output. Why is that?...
[7 replies] Last: Okay, I got it now! Thank you everyone! (by GetMeOuttaHere)
Arguments
 
Hey guys, I have a program here that generates a random array of 10 numbers. My problem is I'm supposed to add a function that accepts an int array and the arra...
[1 reply] : Please don't spam - http://www.cplusplus.com/forum/beginner/185181/ (by TarikNeaj)
Having an error in program (binary operator <<)
 
I keep getting an error (will mark where below) and I'm not sure what is going on here. We have been introduced to overloading an output operator and I am not s...
[2 replies] Last: Was this correct fix? No. operator<< is a binary function, mea... (by cire)
Faulty Repeat
 
Hi, I am trying to teach myself C++ and its not going as well as I had hoped. This program is supposed to repeat when the user wants it to. In Pascal I used to...
[8 replies] Last: So I solved the problem after watching your suggested tutorial. Thanks... (by goldschagg)
Changing Values With References and Iterators
 
I want the user to be able to select a number from the array that will select the item, and change it using references. So far I have been able to get it to cha...
[1 reply] : the references make it so it changes the first value in the array T... (by MikeyBoy)
by blkpny
UPDATED: Sort works! Help w/requiring a comma btwn LastName and FirstName
 
Hi Everyone, I've been working on my code and everything is working great, except that I'd like to require the user to input LastName, FirstName, where it requi...
[2 replies] Last: UPDATE: @coder777 - You're right! 2.) LastName,FirstName format - D... (by blkpny)
range loop with pointer?
 
Hi Trying to teach myself the range loop. Tried iterating through a pointer structure, #include <iostream> #include <string> int main () { struc...
[5 replies] Last: Hi, great, thanks for the code. Makes more sense now! (by bluefrog)
by Ocen
Heap Corruption detected on delete [] L
 
I'm getting this weird error I don't know how to interpret or solve when I try to delete my dynamic array in the destructor. Can anyone help me out? //Li...
[1 reply] : In the constructor you are using the size variable before it has been ... (by Peter87)
TRASH AT FIRST FEW VALUES
 
My code, I cannot share as of yet as this is a graded matter, but as I run my code, there are trash values at the first few index values (2D array). Can som...
[1 reply] : Sounds like you have unitialised variables. Or some other process is a... (by Chervil)
Output isn't working correctly.
 
I'm not sure what isn't going right, but no matter what numbers I input it out puts inf for my batting average, on base average, and slugging average. I cant fi...
[1 reply] : You have the code out of sequence. You can't do any calculations such ... (by Chervil)
February 2016 Pages: 1... 1213141516... 46
  Archived months: [jan2016] [mar2016]

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