Beginners - March 2019 (Page 11)

by wuwy
Why does this "for cycle" keep looping?
I was planning on using this cycle as part of an assignment, but it keeps looping forever. What did I do wrong? To make it more clear, for assignment I need t...
Mar 17, 2019 at 6:22pm
[4 replies] Last: pointSum=18. As there are 18 total votes Using i (or j) < pointSum... (by closed account E0p9LyTq)
A+B Problem
I attempted a A+B problem from an online judge and my solution works but the judgement I got was wrong answer. Can anyone explain why? Description For this p...
Mar 17, 2019 at 4:10pm
[3 replies] Last: Again, don’t be dismayed. We all have had to learn at some point. M... (by Duthomhas)
Stopping while loop
I was wondering if I can stop the while loop in the 12th line somehow instead of using break; in the 24th line. I tried : while(nr != 5 || t == 10) but it won...
Mar 17, 2019 at 2:58pm
[6 replies] Last: Lines 9 and 10 together form the condition of the for loop. In Engli... (by JLBorges)
HELp me (1,2)
Excuse meee Plss can you help me about converting Numbers to words like for example if the user input 1 it print ONE 1-3000 is the maximum number it can...
Mar 17, 2019 at 1:47pm
[23 replies] Last: #include <iostream> #include <string> using namespace std; const str... (by lastchance)
The default Constructor of "input" cannot be referenced -- it is a deleted function
Hello, I am supposed to make a program in which I will be using Struct variables in Union. However, when I use Union, it shows me the error that its default con...
Mar 17, 2019 at 11:53am
[2 replies] Last: Got it, thank you very much! ^_^ (by redfury)
CONVERT 1- 3000 TO WORDS USING SWITCH
HERE I USE IF TOO SO I CAN SET A LIMIT TNX TO SUPERNAL FOR THE CODE HERES THE LINK FOR IT http://www.cplusplus.com/forum/general/71840/ BUT THE CODE HERE WAS ...
Mar 17, 2019 at 11:37am
[1 reply] : Not a switch/case. But you can replace arrays with switch/case if desi... (by salem c)
by Vetzo
Class declaration and its methods.
Hello Forum, To avoid circular inclusion with header files, I declare (not define) an user class 'B' at the beginning of the header file of class 'A'. I can...
Mar 17, 2019 at 10:45am
[5 replies] Last: Hello Forum, Think I get it now. A.cpp: #1 = include B.h, with forwa... (by Vetzo)
I set a limit for the code using if but it doesnt work
#include <iostream> using namespace std; main(){ int num, ones, tens, hundreds, thousands; a: cout<<"Enter a digit from 1-3000...
Mar 17, 2019 at 9:44am
[3 replies] Last: copy that! tnx (by CoolAvocado)
Who wants to teach me switch
SOme one teach me How switch work Pls if theres any professional here pls comee
Mar 17, 2019 at 7:53am
[5 replies] Last: tnx alot everyoneeeeeee promise i read and understand everything you t... (by CoolAvocado)
using pixels and parameters to render images !!
I'm in a graphics coding class and as a beginner, I am having an issue with the loops and other things needed in order to split the screen four ways and put the...
Mar 17, 2019 at 2:02am
[no replies]
Help with Line Justification
Hello! I am having some troubles with a line justification program. The program is supposed to be written using strings. It allows a user to input a string of t...
Mar 17, 2019 at 1:55am
[1 reply] : When you find yourself doing the same thing over and over, that is a h... (by Duthomhas)
No leading zeros?
Text makes cout forget settings? #include <iostream> #include <string> int main() { std::cout.fill('0'); std::cout.width(4); std::cout << std::hex << 1...
Mar 16, 2019 at 9:57pm
[5 replies] Last: And yet it ended up costing extra keystrokes for FurryGuy, you and me! (by dutch)
Print function from class
Your operator>> function takes in some values from the user, but doesn't do anything with them. Shouldn't you be using them to change some of the class member...
Mar 16, 2019 at 9:57pm
[no replies]
FFTW Amplitude and Frequency
Hi, I am a C-Sharp developer and a beginner at C++. I am using C++ to get learn about FFTW but unfortunately I haven’t been able to find any examples of FFTW...
Mar 16, 2019 at 5:14pm
[3 replies] Last: Each bin (index) of the discrete fourier transform is a frequency, but... (by Ganado)
by Vetzo
const class method problem
Hello Forum, I have a class that has a variable of type std::vector<int>. The class has a method that returns the pointer to the std::vector<int> variable. ...
Mar 16, 2019 at 4:12pm
[7 replies] Last: A pointer allows ... So does the reference: // Header: class MyClas... (by keskiverto)
How can I avoid long if...else if chains
Hello everyone, I am sorry if this is a double post sorts. I am working on a random key generator as a practice excercise and I have this function takes input...
Mar 16, 2019 at 3:43pm
[5 replies] Last: So, I went through a second iteration as promised and this is a prelim... (by Alienguard)
I'm trying to write a code that outputs a number spiral, but it outputs very large numbers, and I can't find the problem.
The number spiral is a square with a odd-numbered side length, starts with 0 in the middle, and spirals out counterclockwise until there are a total of [the odd...
Mar 16, 2019 at 3:22pm
[4 replies] Last: #include <iostream> #include <iomanip> #include <vector> using namesp... (by lastchance)
help plz
It keep saying me that 'If' was not declared in this scope #include <iostream> #include <string> using namespace std; int main() { string mystr,pitanj...
Mar 16, 2019 at 12:25pm
[2 replies] Last: thanks (by tomisrb)
Problem with Constructor of Class (Program not running after input is taken)
Hello, I am making a program in which I am supposed to create a class of string and then try to make functions of the string library. So, I started off and ma...
Mar 16, 2019 at 5:08am
[2 replies] Last: Ok I got it. Thank you! ^_^ That was such a bad mistake lol (by redfury)
Printing solutions to a brute force search-- error in print conditions?
So I'm doing an assignment for my Intro to Programming class, where we have to write a program, using a brute force search algorithm with for-loops, that finds ...
Mar 16, 2019 at 4:49am
[1 reply] : #include <iostream> int main() { int n ; std::cout << "n? " ... (by JLBorges)
March 2019 Pages: 1... 910111213... 25
  Archived months: [feb2019] [apr2019]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.