Beginners - May 2012 (Page 37)

Need help with 1 tiny error on my prog
 
This is a guessing game in which the user has 10 tries to get the random number right. Whether the random number is guessed or not, the program will display the...
[3 replies] Last: Thank you so much hadar! Program is perfecto!! THANK YOU! I CANNOT EXP... (by thechadmartinez)
What's Policy-Based Design?
 
Wikipedia is too much to take in without prior knowledge of the term. Can anybody simplify the term? An annotated example counterpart would be appreciated, too ...
[2 replies] Last: They'll do nicely. Thanks, JLBorges :) Wazzak ... (by closed account zb0S216C)
by skarla
help!!!
 
how i can make a list ,that has(1,2,3,4) ? i want this because i want to make a quiz with possibly answers!!! char array4 ={1:'apw',2:'ddaase',3:'2',4:'...
[6 replies] Last: A more flexible approach would be to do the formatting during the prin... (by JLBorges)
by Zara
from string to int
 
Hello everyone!! I'm new in C++ and I would appreciate any idea how to convert a string of digits into integer it represents. For ex. "15" to 15. Zara
[6 replies] Last: Thank you All for help! (by Zara)
variable in a file name
 
Hi :) I have a problem, well it's not a problem, I just don't know how to do it :/ so, here we go: #include <iostream> #include <fstream> using namespace ...
[6 replies] Last: iHutch105 wrote: Dadabe, you're undoubtedly the most patronisin... (by dadabe)
Problems with error checking
 
I begin my very post with what I'm assuming is a very silly question. I'm working on an assignment for school, and while the program itself runs great, I can't ...
[4 replies] Last: You need to think more clearly about what you want to take place when ... (by codeFoil)
by Moooce
stringstream clearing question
 
Since I'm one of those dodgy programmers who uses C + classes, I loiter here in an attempt to be fully converted to C++, you’ll be glad to hear it’s working...
[7 replies] Last: Yep, I agree, ended up with this which works fine for my needs, thanks... (by Moooce)
by remas
Lnk 2019: Unresolved external symbol
 
I recently decided to take up C++ on my own as sort of a hobby. I got a PDF file called "Teaching yourself C++ in 21 days" , and sadly I am still stuck on the f...
[3 replies] Last: Thank you for your advice, I found a PDF of C++ Primer and I'm going t... (by remas)
Strings
 
I have the following string to print "cagty %c5 gty" I want to print it but replacing the %c5 bit with "999". Can anyone tell me hoje to do it in c programmi...
[3 replies] Last: Oh I see, and the result of that would actually be C5, so you can know... (by Hadar)
c++ function error
 
can anyone plz tell why this function is invalid? wht shud i do? char convertDiscount(char discount) { char discountPercent; if(discount =...
[5 replies] Last: char is a variable that can hold only one character, but you're assi... (by codekiddy)
by mhom
Factoring program gets different, wrong results every time.
 
Hi. I'm new to C++, but I have written a similar program in Python. Every time I run the program with the same inputs, it generates different results, despite t...
[6 replies] Last: Actually, I had a brainfart. For some reason I was associating it wit... (by cire)
Issue with User Input
 
When this section of code runs, when I enter an integer for the Number of Grades to be dropped it crashes. void Course::enterGCInfo(int num) { GradeCat te...
[6 replies] Last: Doh! such an easy mistake, like they always are. The value I was pass... (by kayakinack)
by Nybble
Player yVelocity
 
Well I have this piece of code that I'm trying to get to work, basically I want to accelerate the yVelocity of the player as long as space bar is held down, now...
[6 replies] Last: got it ;) (by Nybble)
by kborg
Return char from dec ASCII??
 
I'm trying to understand how itoa works, but unfortunately my mind is lost in the concept. Assuming: fetch() returns the decimal version of ASCII AND I ...
[1 reply] : char a = fetch(); You can probably continue from here, knowing that a ... (by Hadar)
need help beginning bank atm code, please!
 
Basically I need to simulate an ATM. Starting with a balance of 5000. Then, entering a user-input loop, give the user four choices: (withdraw, deposit, show...
[9 replies] Last: No, variable names can have underscores in them. In fact a lot of prog... (by BHX)
Programming from a Flowchart
 
I need to do the following: Write a complete C++ program given in the following flowchart. Test your program for temp = 80, 74, 55, and 102 and for zip = 430...
[1 reply] : Your brackets are wrong: //You did this: { for(;;) //Code } //Shoul... (by BlackSheep)
by LazK53
Debug error - variable not initialized
 
Hello! So.. Basically what my file is trying to do is to open a .txt file, read it and then solve the quadratic equation with numbers from the .txt file. Now I...
[2 replies] Last: That got rid of the error. Thanks! (by LazK53)
'if 'and 'else' HELP
 
im learning C++ and in the book im learning from says to type this code in but when i do i get (error: no match for 'operator>' in std::cin > i;) im using code:...
[2 replies] Last: it worked! thank you Hadar (by guitarjose)
c++ 7 card poker hand evaluation
 
So; I have to determine if there is a) 3 of a kind b)4 of a kind c)straight. I have put the 7 cards into a 1 dimensional array and sorted them but I also need ...
[5 replies] Last: What's the difference between const int and int? (by Gregory Sakas)
Is it possible to declare a string in a function?
 
Whenever I declare the function as a string, it gives me the error: "String does not name a type." If I try to return a string it says: "Invalid conversion from...
[6 replies] Last: And also my bad for not thanking you all. Especially LowestOne, who ma... (by Gregory Sakas)
May 2012 Pages: 1... 3536373839... 59
  Archived months: [apr2012] [jun2012]

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