Beginners - November 2019 (Page 17)

by txnug
Generating Random number from input range
 
I am not sure how to write this program. Any help is needed as I am stuck and this program is due soon. I am very very new to c++ so looking at other similar pr...
[9 replies] Last: #include <iostream> #include <cstdlib> // srand / rand #include <cti... (by George P)
by AL88
Can anyone help me fix the singleton?
 
Hi I'm trying to make a singleton out of the texturemanager class but i'm getting a lot of errors https://pastebin.com/NmZkTf1T please can anyone show me ...
[4 replies] Last: I tried moving the typedef and the pointer declaration to the .h file ... (by AL88)
by Euno
Converting these whiles into fors
 
Hello how can i convert these while statements into for? #include <iostream> using namespace std; int main() { int n1 =1; //Declration of Va...
[3 replies] Last: You had trouble with logic in http://www.cplusplus.com/forum/beginner/... (by keskiverto)
Declare an array in Global but initialization in function
 
Hello, I want to declare an array in Global but initialization in function. How can I initialization array in a method without pointer? #include<math.h> #i...
[1 reply] : void main is a nonstandard extension. main should be of type int in c... (by jonnin)
Horribly confused by the rand operator and this Monte Carlo problem
 
I am horribly confused by how I'm supposed to get those outputs listed below. My current code is also below the instructions. How do I set up the 2 x 2 square w...
[1 reply] : @Allosaurus First of all, please PUT YOUR CODE IN CODE TAGS. Look at ... (by lastchance)
Text File to a 2D Array
 
I have a text file that contains a list of IDs and sales amounts. I need to read it into a 2D array. I also need it to accumulate sales for each ID instead of r...
[7 replies] Last: Using the data file contents previously posted: #include <iostream> ... (by George P)
Finding the average number from a file
 
I am trying to find the average of all the numbers of 2 files (numbers1.txt & more_numbers.txt). The average calculations are always incorrect. The smallest & l...
[2 replies] Last: Consider writing a few (reasonably small) functions. For example: #i... (by JLBorges)
November 2019 Pages: 1... 151617
  Archived months: [oct2019] [dec2019]

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