Beginners - October 2013 (Page 57)

creating a unique random number generator
 
Hey everyone, so I am trying to have this program randomly generate 10 student id numbers that are 1 through 10 but I do not want there to be any repeating numb...
[1 reply] : #include <cstdlib> #include <ctime> #include <algorithm> #include <io... (by JLBorges)
by Bitly
Vector of Structures with a vector
 
First I would like to say this is a homework assignment. I am by no means asking for help with it directly. I am getting weird output on the vector inside the s...
[4 replies] Last: I should have tried the .clear before posting to be honest. I thought ... (by Bitly)
A beginner seeking guidance
 
I have been trying for a quite a while to detect why the program runs but doesnt show the final calculated outputs. Can anyone suggest me what is wrong in the g...
[3 replies] Last: What does the while loop do? (by GRex2595)
Pointer to an array of data members
 
Why is the line marked 'won't compile' an error? enum Country {USA, China, ..., Jamaica, FIRST_COUNTRY = USA, LAST_COUNTRY = Jamaica, NUM_COUNTRIES}; str...
[1 reply] : &Crowd::numPeople is a member pointer, not an array of integers, so ... (by LB)
Mini help regarding spaces on one line
 
Guys! Having trouble here. suppose a user enters in these numbers with spaces or maybe even commas. What function do I use to get all of the numbers from the sa...
[7 replies] Last: Repeat question. http://www.cplusplus.com/forum/beginner/113140/ Do ... (by GRex2595)
Reading numbers from the same line
 
Guys! Having trouble here. suppose a user enters in these numbers with spaces or maybe even commas. What function do I use to get all of the numbers from the sa...
[4 replies] Last: Example using stringstream. http://www.cplusplus.com/reference/sstrea... (by GRex2595)
Quick question about double - float
 
I have a quick question about the error C4244 "Conversion from double to float - possible loss of data". Why am I getting this message when I build my progra...
[11 replies] Last: I see, so they're more nuisances than anything else. I will look into... (by Annatar)
Rock Paper Scissors
 
Decided to make a game of Rock Paper Scissors and I noticed I haven't learned how to use words as variables, I've only used numbers...hopefully my code can expl...
[5 replies] Last: All your comments clear up sooo many things!!! Thank you guys sooooo m... (by jvjvalerio)
by AGZZ21
For loops on Guessing game?
 
I'm making a program in where you are trying to guess the computer's random number, but I want to restrict it with having only 5 chances to guess the right numb...
[4 replies] Last: Another option int attempts = 5; for(int x = 0; x < 5 && guess != n... (by GRex2595)
Need help with mastermind game please
 
If I run my program, I don't ever get the correct number of white pegs and black pegs for the combinations. I also get over 4 total pegs when I get the right an...
[1 reply] : The massive size of your code makes it difficult to read. Try to get ... (by GRex2595)
Beginner Questions
 
A few simple, naive questions: If I wanted to write a program with graphics, say like a solitaire game, would I need something like Visual Studio? And,...
[10 replies] Last: Thank you all so much. I've been away from programming for a while. Wa... (by Barry Wiechman)
read more than one line
 
Write your question here. I am trying to find a way to make the program read more than one line.. #include<iostream> using namespace std; int main() {...
[9 replies] Last: I just made a change in lines 16 and 20. (by Josue Molina)
by Ltp
Linked List Insert value problem
 
Anyone can say, whats wrong here? #include <iostream> using namespace std; class node{ public: int value; node *next; void insert_front(node *&h...
[5 replies] Last: Thanks. Worked.. (by Ltp)
Help with looping program
 
Hello, I am currently working on a question presented in my homework as follows: ---Modify last week’s area of triangle program so that it loops until va...
[2 replies] Last: I found the link to be very beneficial. I will include a finished cop... (by campurdy)
debug assertion failed! Can't fix the problem
 
My question matches the title, also any insight how to fix problems like this in the future on my own would be great. The code below is the function(odigravanj...
[2 replies] Last: Oh my! thanks a lot. Lack of sleep must've got to me... :) (by VrliVitez)
Linked Lists
 
Is there a website, where I can explore more about the above topic (Linked List) Thanks
[4 replies] Last: Thanks. (by willynilly)
Help with first function
 
I could really use some help debugging my first function. I'm completely new to programming and this is my second day trying to learn C++ so please bear with me...
[5 replies] Last: Thanks so much for all of the help. I really like the check to see if ... (by MrPicklez)
Segmentation Fault
 
I am trying to create an ADT String and when I compile my program it gets a Segmentation Fault while it tests my add function. Here is what I have. I am not sur...
[13 replies] Last: Wow I am stupid... Thank you so much for the help! That was my issue a... (by ADTR2012)
by leo255
Need some help with my program that finds divisors and prime/perfect numbers
 
So, here's what I have... As you can see by my code, if a number is prime, I just output 1 and that number. For whatever reason, I'm not getting the divisors, ...
[3 replies] Last: You can probably adapt this to give the required output. Your code was... (by Chervil)
by cseely
Vectors and while loop.
 
Hello I have to create a program which allows the user to enter the type, number, size and aggression of how ever many types of fish they have and then calculat...
[2 replies] Last: Sorry I don't exactly know what your saying, we have not reached creat... (by cseely)
October 2013 Pages: 1... 5556575859... 86
  Archived months: [sep2013] [nov2013]

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