Beginners - September 2015 (Page 7)

by noodel
Remainder task
 
Hello. So I need to do this task for school, this program runs for me but I get wrong answers( 10 and 4 instead of 9 and 11). It might b not the program error, ...
[2 replies] Last: Thank you! (by noodel)
A Member greeting prgram
 
Hi guys. I am having a hard time figuring out how to code the following; It is for my assignment that is due tonight; Write a program to print a particular ...
[5 replies] Last: #include <iostream> #include <string> using namespace std; int main... (by closed account 48T7M4Gy)
Compiler?
 
I've written a program that calculates the sum of numbers on a number line. <----------|--------------------> -4 -3 -2 -1 0 1 2 3 4 5 ...
[5 replies] Last: It's nice to see other examples, and it's useful too. Thank you! JLB... (by doctorDJ)
Solving a quadratic equation
 
Hi guys. I am meant to write the a program according to the requirements but unfortunately I am stuck. I was wondering If anyone could help me with the foll...
[1 reply] : Quadratic formula basic setup is x = (-b +- sqrt(b^2 - 4ac)) / 2a Qu... (by YFGHNG)
[Error] expected unqualified-id before '{' token
 
Hi everybody! I got a problem with the code below. It should find the maximum and minimum values in an array, but it doesn't work cause of an error in line seve...
[1 reply] : A good tip to keep in mind is if the compiler tells you the line they ... (by YFGHNG)
cin not working even with proper header files (1,2)
 
Guys .. I've got a prob here.. cin isn't working.. see code below.. #include<iostream.h> #include<conio.h> #include<string.h> #include<dos.h> void ins()...
[20 replies] Last: Let go all old shit.. Using Visual Studio 2013 .. Working Well.. The c... (by Swapnil2000)
by Arquon
How do I use IF in FOR correctly ?
 
Hello, I need to do some exercises, in which I need to use IF in FOR, and im really having trouble with it. The result I need to get in exercises : 1st exercise...
[7 replies] Last: Okay, thank you ^^ (by Arquon)
Cleaning out the main
 
Hi guys, I have these two routines in my main. I wanted to move them out to help "clean up" the plate of spaghetti I have now. The trouble is, I have no idea ho...
[3 replies] Last: The main idea is to use move semantics (proper move constructor + retu... (by MiiNiPaa)
help please
 
need a help. What is the best program to make a tower of hanoi game using array and loops only? Please help me.
[3 replies] Last: https://www.mathsisfun.com/games/towerofhanoi.html (by closed account 48T7M4Gy)
Getting errors with game code. Need Help.
 
Hi, I needed help to run the following code which is being used for a game for our project. I was getting errors. Could someone maybe try running it and see wha...
[2 replies] Last: I got a load of stray \342, stray \200, and stray \214 errors. Those ... (by pearlyman)
by cjs209
Runtime Error
 
I am in a C++ class working on a challenge activity using the find() command. I am having a hard time figuring out how to correct my code and prevent the erro...
[2 replies] Last: I copied your code and it runs just fine. I even copied and pasted ano... (by pearlyman)
Help with loops
 
Okay guys . This is an assignment for my class . So far i managed to complete most of them but im having problems with this question : 9.)Write a program tha...
[5 replies] Last: The code worked but im getting a different display , also the link doe... (by PandaQuin)
How to print vector after sorting
 
Im having trouble with a c++ assignment: Write a program that performs a sorting routine as discussed in class. Create an array of 10 integers (e.g., 63, 42...
[1 reply] : http://www.cplusplus.com/reference/algorithm/sort/ (by closed account 48T7M4Gy)
Decimal places question
 
Hello every body, I have a problem with outputing the correct decimal places by using the division operator. Eg) ----------------------- #include <iostream...
[4 replies] Last: ahh i see. ok I got it. Thank you very much for the electrification ... (by ultracannon)
Checking what side a rectangle is colliding with another rectangle
 
My code: bool left = false; bool right = false; bool top = false; bool bottom = false; //check x axis ...
[1 reply] : There are several considerations. The best consideration is probably ... (by Duthomhas)
Can't read .txt file using Xcode
 
'Write a program that reads in from a file a starting month name, an ending month name, and then the monthly rainfall for each month during that period. As it ...
[no replies]
C++ Programming Assignment: Char Issue
 
I'm working on an assignment for one of my programming classes and ran into the following issue. As you can see the program outputs a menu and the user enters t...
[3 replies] Last: Thank you both SamuelAdams and DyslexicChciken. I'll mark this one as ... (by NoCompletion)
by Dazzer
Return by address from Learncpp, me confused
 
Hi folks, I'm failing to get my head around the following code from Learncpp.com: int* AllocateArray(int nSize) { return new int ; } int main() { i...
[2 replies] Last: Many thanks, i re-read the Learncpp lesson about "new int" and now i u... (by Dazzer)
Menu system crashing for program
 
Hi new to C/C++ and needed help with a program. In this program I am supposed to take user input to find the area of curve by using the midpoint rule and trapez...
[no replies]
by LAplus
Problem with presenting output all at once:(
 
Hi Programmers, May I know why my code cannot input then output everything all at once just like the question below? There seems to be no output when I key in...
[4 replies] Last: There is no output because your reading is incorrect, the loop in line... (by ne555)
September 2015 Pages: 1... 56789... 42
  Archived months: [aug2015] [oct2015]

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