Beginners - April 2020 (Page 3)

generating random double between x and y??
 
Hi ! I'm just so confused with how to generate the random double ranging between 'lower' and upper. My code is out of the range I set up. Please let me know whi...
[3 replies] Last: Thank you guys!! (by jasonkk)
by m1ewi5
source files
 
Where can I find source files for the example programs for this C++ course?
[2 replies] Last: Thanks for quick reply. Sorry, I'm taking a Coursera course called Obj... (by m1ewi5)
Problems with expression.cpp
 
Having a bit of trouble with accessibility in this program. I know it's probably something simple that I am missing. Also, unclear on how to do the files. Thank...
[10 replies] Last: Respectfully Andy, for anyone reading this post who may not know any b... (by jwin)
by annw3y
Sorting vector(BubbleSort)
 
I have class Date, functions bubbleSort and printVector. So my task is: Use the function bubbleSort to sort vector type objects Date. I've done something but ...
[1 reply] : So can we see the < and > operators that you have defined for Date, pl... (by lastchance)
by kimoL
Help
 
i build this beginner code for my college project and i had some errors this a part of it: # include <iostream> # include <iomanip> # include <string> # i...
[3 replies] Last: Hello kimoL, PLEASE ALWAYS USE CODE TAGS (the <> formatting button)... (by Handy Andy)
Need help understanding code for Tetris game..
 
The code presented in this Utube video: https://www.youtube.com/watch?v=zH_omFPqMO4 also can be downloaded there.. My problem is with these parts, Inside the '...
[5 replies] Last: He's coding the initial position of the pieces like this: 0 1 y 0... (by dutch)
Make custom "include" folder permanent...
 
We have a folder containing custom header files which will be used in pretty much every program we create. We know how to add this folder path to each new proje...
[5 replies] Last: ANSWER You can, but you shouldn't. See, Windows is not the same as ... (by Duthomhas)
by asxxx
Dynamic programming
 
Hi, I am trying solve coin change making problem using dynamic programming but I have double problem because I can't use 1 coins. My coins are {2,5,25,50}; ...
[2 replies] Last: By the way the following is not legal in C++: cin>>change; int ... (by jlb)
About assigning the values(private class)
 
Hey, I am a Program goer and I just started to learn c++ last week. In the tutorial I'm reading, I find an example here: So the line 10 The snippet【Test():...
[8 replies] Last: Since the original question was about class member initialization, spe... (by George P)
Get total prime numbers
 
I have one program that show a prime numbers, like if i enter "9" as limit number the result is "2,3,5,7" (total 4 numbers) and i want to print the total number...
[3 replies] Last: Thanks to @lastchance and @salem c. My problem have been solver now (by shinigamiR)
Quicksort using the STL partition function
 
I wrote the following quicksort function: void _sort(vector<unsigned short int>::iterator left, vector<unsigned short int>::iterator right) ...
[1 reply] : The main problem is you asked the question the wrong way. Don’t you ... (by Enoizat)
Pass or Fail
 
Good day I've been tasked with an assignment where I am meant to write a program that indicates whether a student has passed or failed after they have made an i...
[3 replies] Last: bool hasPassed( int English, int Maths, int Physics, int Geography, i... (by lastchance)
Automatic Function Counting/Listing
 
If I need to make a program that can count my total number of functions from a file and take all of those functions, list its parameters, type, and name, how wo...
[7 replies] Last: After a bit of brainstorming: struct Parameter { string name; st... (by thmm)
getName
 
hi im making an get name function to get my players names i get the name outputs i just wanna know if i done it properly :) class player { public: string n...
[10 replies] Last: Look at Ganado's latest post. I think there is nothing to add. (by thmm)
Need assistance
 
So in my last lab i created a number class that derived from string and was used as a base class for both Integer and Double. Right now im javing issues with my...
[5 replies] Last: I need help with the polymorphism part just with me adding the numbers... (by LaminarFlow)
Return value in infinite loop
 
Hello! I'm currently trying to work with some image processing. I'm using a function that streams the camera captions with an infinite while loop. I just wan...
[3 replies] Last: Thanks for the answers! i've tried to implement your approach and it w... (by Ditacool)
Storing Values for each iteration of a function.
 
I have a function for a bisection method. I need to store the values in a string or array for each of the following, a,b,c,solution(c), for each iteration. How...
[4 replies] Last: I changed your function ... to one I could solve. #include <iostream... (by lastchance)
stoi exception (invalid input)
 
I'm trying to write this program with helper functions that creates a barcode for a 5 digit zip code. This is using a normal 7,4,2,1,0 weighting system. Half ...
[4 replies] Last: Oh wow... true sign I need to take a break. I must have overlooked th... (by dakotad8218)
Sorting Complex Number in C++
 
Hello, I wrote a program for sorting complex numbers with C++. To print the sign of the imaginary part of the number I wrote the below function. Is it true? ...
[5 replies] Last: [quote=Shervan360]Thank you, could you please more explain? At the m... (by lastchance)
by thmm
Multiplying int with double
 
What is the point of multiplying an int with a double and store in an int? // Convert a rk value to an integer. int GetIntegerFromRKValue(int rkValue) { ...
[2 replies] Last: Thanks Ganado. (by thmm)
April 2020 Pages: 12345... 20
  Archived months: [mar2020] [may2020]

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