Beginners - February 2021 (Page 6)

by y19177
Unknown problem
 
New to C++. I'm trying to understand RNG and how to produce random numbers in C++. I'm not sure what is the mistake of my code, but it gave me gibberish numbers...
[16 replies] Last: Re 'Simple random number generation facilities' in Library Fundamenta... (by seeplus)
Which method to draw 2D map (for a game)
 
Hi there Just a quick question. I am making good progress on my little space shooter test game and am now thinking about the next test, which would go more int...
[2 replies] Last: Thanks! I indeed plan on having a static world. So in this case I will... (by theoneandonlyboiler)
by Wiss
What is considered a good value of hypervolume indicator for a given Pareto front surface?
 
For the multiobjective optimization algorithm applied to a specific problem, I am optimizing for 3 objectives. I obtained a hypervolume value of the Pareto fron...
[4 replies] Last: a hypervolume value of the Pareto front points equal to HV= 0.014 us... (by lastchance)
by adsaba
cin number input with space
 
When inputting a series of numbers with a space in between, cin merges the number together. I am wondering how I could separate put all the digits in a vector. ...
[2 replies] Last: Okay, now understood. Thank you so much!!! (by adsaba)
by icezy
Strcpy error
 
Am having a problem debugging this code Please I need some help // Debug 5-1 #include<iostream.h> #include<conio.h> class Worker { private: ...
[12 replies] Last: You can also do this, as strcpy() returns a pointer to destination: ... (by seeplus)
Finding max and min from text file containing integers, square brackets, and commas.
 
I have been struggling with this code for quite some time. I have found a way to find the average using the same method. However when finding the max and min it...
[5 replies] Last: #include <iostream> #include <sstream> #include <fstream> #include <a... (by lastchance)
Remove Image From Memory.
 
Hii Guys!! I am making a program that retrieves a download link from a website, and with the retrieved data, will then download a PNG image file (Local Webserv...
[1 reply] : > it always retrieves the original image as though it is cached on my ... (by JLBorges)
[Assignment Help] Need help implementing a recursive depth first maze runner
 
Hi, say I need to write a recursive depth-first maze running algorithm that takes the following signature: int runMaze(Maze& theMaze, int path , int fromC...
[7 replies] Last: Ugh, I haven't touched C++ in too long and have been working with too ... (by Pundrew)
Pause For 10 Minutes.
 
HI Guys!!! I am trying to pause my program for 10 minutes and the only way I know how to achieve this is to use: Sleep(600000); The number seems ...
[1 reply] : https://www.cplusplus.com/reference/thread/this_thread/sleep_for/ you... (by jonnin)
Using File Handling (insert, add delete) in an initialized struct
 
Hello, there. I am having trouble with my project. Long story short its a pc shop where you can buy processors, motherboards, etc. I have finished in the custom...
[6 replies] Last: Hello WeebTriestoCode, Not to say that I have fixed all the problems ... (by Handy Andy)
Approximating the value of e
 
I am close but I need help. The problem is: "Interestingly, the value of e can also be approximated using the following expression: 2+1/(1+1/(2+2/(3+3/(4+4/(...
[5 replies] Last: I had to tweak the code so that it would allow input from the bot that... (by Deer of School)
How to extract integers from user input?
 
I am asking the user to input some numbers in one attempt, using getline(). However, I am stuck at extracting each number and putting them into 2D vector<int>....
[2 replies] Last: #include <vector> #include <string> #include <sstream> #include <iost... (by lastchance)
Word Counting Project
 
something is wrong with the if statement, since the words int doesn't change at all #include <iostream> using namespace std; int words=1; int main() ...
[5 replies] Last: Something like using .find(): #include <iostream> #include <string>... (by seeplus)
Errors with Variables in Function
 
Okay, I have one question split up into three parts. I have a school assignment that requires me to read input from a .txt and input each line into a struct arr...
[14 replies] Last: Assuming that maxflights is the size of the array, then: if (flight... (by seeplus)
by Ch1156
Naked pointers vs smart pointers
 
So going through books and code I see smart pointers and naked pointers and am wondering if there are situations where i have to use a naked pointer during game...
[3 replies] Last: > wondering if there are situations where i have to use a naked pointe... (by JLBorges)
A little bit stuck on implementing child class from parent class
 
Hello, my entire program (including the header files) all compile. But when I go to test my program, my get is not being shown in the console window, i'm not su...
[5 replies] Last: As one file for ease of compilation, consider as a starter: Than... (by FanOfThe49ers)
Dev C++ Hello World Program outputs make Error -largenumber
 
The Machine is running the latest version of Windows 10. Dev C++ 4.9.9.2 (mingw) was installed on the C: Drive (C:/Dev-Cpp) via the official bloodshed website. ...
[6 replies] Last: Installing a newer (5.11) seems to have fixed the issue magically. It ... (by My Echo My Shadow And Me)
Segmentation error with vector of struct
 
Hi everyone! I'm having a whale of a time trying to figure out why, or rather, how to avoid getting the segmentation error after the getline input on line 29 (...
[6 replies] Last: Hello noobstudent, I finally managed to get something to compile and ... (by Handy Andy)
by siid14
Linked list
 
Can someone give me a proper explanation of this program about the linked list? Have a hard time understanding. Here it is in 3 part : CREATE LIST st...
[5 replies] Last: To understand linked list code, consider a list as a collection of nod... (by seeplus)
A program to find prime numbers and set them into a new array
 
Hi. i wanted to make a program that finds prime numbers in an array that user gives it and put them into a new 2*n array that contains prime numbers that are fo...
[5 replies] Last: There's issues with is_prime. You need to continue the loop until the ... (by seeplus)
February 2021 Pages: 1... 45678... 12
  Archived months: [jan2021] [mar2021]

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