Beginners - October 2012 (Page 41)

by ACE123
mask password and store as string
 
Hi, my program requires a username and password to gain access. I need to mask the password input with *. I have researched heaps and found codes that don't wor...
[7 replies] Last: Thanks for all your replies. but something still doesn't work. these c... (by ACE123)
by aa6
Magic Number Program
 
I have to write a program that allows the user 5 chances to guess a random value. This random value changes 7 times and each time i have to allow the user 5 att...
[1 reply] : @aa6 Noticed this often done mistake.. for (int guesschance=1; gue... (by whitenite1)
Writing a program with specific numbers
 
Hey guys, I'm trying to write a program that reads in an integer that is greater than 1,000 and less than 1,000,000. And then to display the number with a co...
[2 replies] Last: Hey fmdub I appreciate the help, this is what I got #include <iostrea... (by taku nishino)
by Sathed
Adding items to a vector
 
I have the following code: vector <int> myVector; int theData; ifstream myFile; myFile.open("TheData.txt"); do { myFile >> theData; myV...
[3 replies] Last: That's essentially the same as Vlad's... except the failbit can be s... (by cire)
Easy program how to implement arrays
 
We just stared with arrays today and i have a hard time understanding them. I am trying to implement arrays into a program i already did before, the program fin...
[no replies]
by gfer
Need help please!
 
Hi all, I have been trying to read a comma separated .txt file into an array and print it to console in C++. The txt file consists of two columns of double t...
[1 reply] : while(!getline(is,line).eof()) // what if the stream is in an inval... (by closed account DSLq5Di1)
by fmdub
Trouble understanding extracting w/ istringstream.
 
I'm trying to parse user input into a command and a string to be operated on. #include <iostream> #include <string> #include <sstream> int main (){ ...
[2 replies] Last: ^learned something new, thanks much! (by fmdub)
Finding files in a folder
 
I was curious if there was a way to search a folder for files. I want to be able to let the user see a list of all .txt files in a folder, but I gave them the a...
[no replies]
hey guys :) could you tell me why my bunny name generator crashes sometimes?
 
every know and again it crashes, not allways but every know and again, i checked the numbers and they dont go off the end of the array so i cant think what it m...
[3 replies] Last: oh yeah...i thought that because of the plus one i would keep it abov... (by devonrevenge)
problem with assignment in a function of class
 
The following function SignalChangedEvent(theSimulation.time + delay, outputWires, outputValue, i) has to be implemented. I have written the following: ...
[2 replies] Last: Thanks!! :D I just lost track of the stuff through all the mess. (by closed account zhq4izwU)
by dusty
Help with logic error
 
Writing a program that when you type in a letter it would return the corresponding number on a phone. Every letter, number, anything returns the number 2. Any...
[7 replies] Last: You might prefer to use a switch statement for cases like this. http:... (by scapegote)
inputting dates and validating dates.
 
Hello!! I am working on a program in which you input three integers and then asks to checkif they are valid dates. I have been working on this code for a while...
[4 replies] Last: ok thanks I got :) (by ariana2608)
Eclipse Output Problem
 
Here is the exact problem I am having step by step. 1. Open Eclipse (Juno) 2. File -> New C++ Project -> Name Project Here 3. Project Type -> Executable ->...
[no replies]
by BJzero
i need some help
 
hi i am a beginner in C++ i need some help in this i have created a string of 40 characters to hold a name the user must enter for example: James Bond i ne...
[1 reply] : http://www.cplusplus.com/reference/string/string/ Could be useful. Le... (by scapegote)
constructor problem
 
Hey, I'm having trouble with constructors of the derived class. I have the following class called Event: #include "component.h" // Execution event in ...
[1 reply] : The base class has no default constructor. When an object of the deri... (by vlad from moscow)
by Fovv
Enumerations
 
I just had a question about enumerations (relating to an exercise out of "Beginning C++ through game programming") The exercise has you edit the following pr...
[1 reply] : They make a code more clear and readable. (by vlad from moscow)
Tons of || in an if
 
I don't understand why this does not work. I know that there are better ways to do this program but I'm just concerned about why it didnt work: #include <io...
[3 replies] Last: Alright, I understand. Dangit. (by bowlbase)
any one cloud help me with this small problem
 
i just start today to do my Assignment: i have these problems on my program any on can fix it to me # include <iostream> using namespace std; int m...
[2 replies] Last: Line 22 is why you have that error. Looks like it's not the only issue... (by scapegote)
proof c++ hates me my random number generator generates the same number
 
the identical program can be found on uncle buckys web video on random numbers http://www.youtube.com/watch?v=naXUIEAIt4U&feature=edu&list=PLAE85DE8440AA6B83 a...
[2 replies] Last: ooh yeah sry , so much for exactly the same (by devonrevenge)
Coding Help (C++)
 
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { double i; for( i = 1; i<=10; i++) { if( i == 1 ) cout <...
[12 replies] Last: I would like to thank everyone for brainstorming and coming up with so... (by Hitachiko)
October 2012 Pages: 1... 3940414243... 84
  Archived months: [sep2012] [nov2012]

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