Beginners - October 2016 (Page 40)

not returning what i want
 
i'm trying to write a function that returns decimal average but when it return it return with crazy number and letters. #include <iostream> using namespa...
[1 reply] : Hi, You never called the average function in your main(), call it aft... (by shadder)
Can't execute a while loop from a different function properly.
 
I can't execute the while loop in stateOne() line 116 properly, if i execute the function from stateTwo() line 256. The idea behind the code is to simulate ...
[2 replies] Last: i think i fixed it! the break; in line 141 caused the problems. and i ... (by Neuling)
What's wrong with my code?
 
I think it might have to do with line 107. #include <iostream> #include <fstream> #include <iomanip> #include <cctype> using namespace std; const ...
[1 reply] : What makes you think there is a problem with your code? What exactl... (by jlb)
Polynomial Class Implementation Issue
 
Hello. I'm currently having issues with one of my programs and I can't figure out why it doesn't work. I have tried different variations of my code, and other w...
[no replies]
void example help
 
I'm on chapter where its teaching me what void do. From what I see, it mean to return no value. So when i execution it. It result in Error id returned 1 exi...
[1 reply] : Something else is causing that message. You correct that in a function... (by closed account LA48b7Xj)
Help!!!, snake game
 
i am newbie to cpp and is wondering if you pro programmers could help me sort this problem out . i do not know how to add a continues level in snake program lik...
[3 replies] Last: Like I said I can't compile the code on my PC, So all I can do is gues... (by shadder)
Swap results in non-terminating recursion in Assignment Operator
 
The use of assignment operator results in non-terminating recursion and I can't understand why. It works if I swap by member. The same copy assignment implem...
[2 replies] Last: @Peter87 Thank you :) (by mpark4656)
Just started programming in c++ again. What does this mean?
 
I'm confused about this new syntax. Here I have a constructor getting defined but the argument list and the name it seems to be given seem to be bothering me. C...
[3 replies] Last: You need to have it in one place. If you define the constructor inside... (by Peter87)
Question about const parameter and pointer
 
This is a simple project that I'm working with. This is a linked list that supports a number of operations similar to std::list. I was writing one of the inser...
[2 replies] Last: @keskiverto Thank you! (by mpark4656)
Code works, but screen closes right after I run.
 
I'm on Visual Studio --> general --> Empty Project. What could be the problem? I even used a system("pause") on line ~50 #include <iostream> #include <fstrea...
[3 replies] Last: So what should I change or add to fix this problem? (by mike0910)
assigning a letter grade to a numeric score?
 
My program has to convert a numeric score and assign a letter grade to it. Problem is when the score is outside the 1-100 interval is still shows "letter grade ...
[2 replies] Last: So simple! lol. Thank you so much! (by james1979)
error: no input files
 
I have tis problem with a snippet that I wrote down textually from a book. I'm using Code::Blocks, my OS is Ubuntu 16.04. // This program has literals ...
[3 replies] Last: the thing is to assign the apples to 20 so the statement gets like tha... (by Dreaddisk)
table of 15 letters five random letters showed
 
I want an algorithm which can do the following to have a table of 15 letters and deleted whenever 5 random letters and showed the variables I want to string dec...
[2 replies] Last: Hi, could you show us what you did/tried? PS: This ain't a homework ... (by shadder)
difficulty in -nested for loops-
 
hello, can someone help me, i have a test due next week and i have a bit of difficulty understanding nested for loops. Write a C++ code to produce the patte...
[1 reply] : int i, j; for(i = 0; i < 5; i++) { for(j = 0; j < 5; j++) { ... (by SakurasouBusters)
I feel so dumb, please help.
 
I've recently started a university night course in c programming, i'm trying my best to learn as much as I can and it's a "beginners course" but everyone else t...
[1 reply] : //learn to indent #include <stdio.h> int main() { //main must return ... (by ne555)
How to set a range of values from 1 to n?
 
Hello! I was experimenting with setting a range and getting a range of values to and from an array where I wrote this procedure. #include<iostream> using n...
[7 replies] Last: There are multiple ways #include <iostream> // std::cout #include... (by keskiverto)
Where is the file located after I created and wrote to it?
 
I would like to open demo file.txt but I don't know where it is saved on my computer. Where is it located? #include <iostream> #include <fstream> using...
[8 replies] Last: Ok I see. Weird that it would appear in another directory though. Than... (by DoABarrelRoll94)
by NICE8x
Modulo Syntax Error
 
I am confused why Visual Studios says that after "century)" right before the "% 7;" there needs to be a semicolon. It says I made a syntax error. But I want to ...
[1 reply] : The modulus operator requires two integer values but floor() returns a... (by jlb)
Practicing C++
 
So I have learned the basics of C++ on a website called sololearn. However I want to go further with c++. So what is a good way to practice C++. I am definitel...
[1 reply] : You can do these practice exercises: http://www.cplusplus.com/forum/ar... (by Arslan7041)
by NICE8x
If Else Statements Issue
 
I agree that my if else statements are pretty convoluted but I was sure all the brackets and pairings within pairings matched up correctly yet I continue to get...
[2 replies] Last: Thanks for your help but I decided to just rewrite it with less pairs ... (by NICE8x)
October 2016 Pages: 1... 3839404142... 51
  Archived months: [sep2016] [nov2016]

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