Beginners - February 2019

Random numbers lower than 100,000
Hello, I need your help getting numbers from 1 to 100,000 into an array randomly with a seeded time...
[3 replies] Last: #include <iostream> #include <random> #include <ctime> double GetRa... (by JLBorges)
Exponentiation function
Hello community I have a problem with the statement of a problem, and it gives me a doubt, I am n...
[5 replies] Last: sure. 3 to the 20th power. a for loop, to get that, is going to mult... (by jonnin)
by opisop
When are functions needed and where should they live? (1,2)
I am looking for some rules, explained in beginner terms, about how to use functions effectively. I ...
[20 replies] Last: size_t is a typedef that results in the largest unsigned type the syst... (by TheIdeasMan)
Memory problems w/ Hangman program
Hello! I'm having issues with this piece of code that I translated from C++ to C. The problem is tha...
[4 replies] Last: Will give it a try. Thank you! (by TomShoe)
by nypran
names alphabetical order
Hi, I feel a bit lost in this code. I have to complete it according to the direction stated in ...
[1 reply] : First, comment out the call to sort() at line 25. This will let you d... (by dhayden)
4 winner lottery
How do i modify the following code so that a number isn't repeated more than once? #include<...
[3 replies] Last: int used[ MAX_NUM] = {0}; //zero is 'false' for (int i = 0; i<4; i++... (by jonnin)
Using setprecision
What is the proper placement of setprecision(2) so that I can set the decimals to always be at 2 poi...
[6 replies] Last: Hello ChimpCoder, Over time I have found that cout << fixed << showp... (by Handy Andy)
by nypran
Rock paper scissors 2
Hi, I am not sure what is wrong with this code and how to fix it. It should stop when comp or us...
[3 replies] Last: variable names! if I see maxgames, I expect to play 10 rounds. if ... (by jonnin)
Creating a program using a vector?
Here is what I have to do: Read some text into a vector, storing each word in the input as an eleme...
[3 replies] Last: More input. I took the offending for loop off and it stops on DONE no... (by jonnin)
Find the highest and lowest value of a multidimensional array
Hi, I had another questions in regards to a topic I previously posted. I was working on finding the...
[4 replies] Last: Ohhh ok perfect I get what you mean now. I'll make sure to apply this... (by kdrewes)
Operator overloading<< to a class
Hey! I want to overload the operator to a class. But it doesn't seem to work. Cool if someone could ...
[11 replies] Last: Sorry, I couldn't keep myself from playing with your code. I admit it ... (by Enoizat)
Tutorial on how to manipulate a text file using the ASCii value?
Hello, I am looking to create a line of code that reads in a text file and then manipulates the ASCI...
[2 replies] Last: define unscramble. Clearly you want an encryption / decryption progra... (by jonnin)
by Majeek
Exe File Marked As Virus?
Sent to a friend to see his reaction, and basically all his anti viruses went off including Windows,...
[6 replies] Last: do a deep scan on the .exe file to ensure that some actual virus has n... (by jonnin)
by Eraun
Always goes to error
I'm pretty new to c++ and I've been trying to create this rock paper scissors game where you can ent...
[6 replies] Last: Alright, so I put the numbDiff = rando - pNumb after the if then state... (by Eraun)
Creating a function that returns a list of objects of a specified type from another list of objects
Hey all. As mentioned in the title, I'm trying to create a function that returns a list of all the o...
[3 replies] Last: Yes; a failed dynamic cast on a pointer yields a nullptr . (by JLBorges)
by nypran
rock paper scissors
Hi, I am writing a program that leads the user to play a rock/paper/scissors game against the comp...
[2 replies] Last: I have written MAXNUMGames=10 before and it worked, but it stopped at ... (by nypran)
by yat89
Sum up vector and insert function
Hi everyone, I got a task to sum up vectors. But each time the amount of the summation reaches 15, I...
[4 replies] Last: Thanks FurryGuy and lastchance for your suggestions. Most apprecia... (by yat89)
C++ Project path
Hi, I'm a beginner in C++. I'm using C++ in Visual Studio 2015 environment. I would like to read a ...
[1 reply] : (by salem c)
Can somebody explain this code to me.
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main(){ ...
[2 replies] Last: Well you already added one debug cout statement, so add another cout... (by salem c)
by Rubes
Looping issue
I can't figure out this formatting loop. The program finds out if a number is divisible by a certain...
[3 replies] Last: Quick and dirty: #include<iostream> int main() { const int row_c... (by closed account E0p9LyTq)
February 2019 Pages: 123... 23
  Archived months: [jan2019]

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