Beginners - June 2013 (Page 34)

Program that plays guessing number game
 
I have a program that generates a number between 1 and 100 and then has it guess what number it is. Its first guess is always 50, then it does something differe...
[1 reply] : https://en.wikipedia.org/wiki/Bisection_method You need to keep track ... (by ats15)
by Andym
convert a string to an integer
 
why do I get an upside-down question mark with the following function? int FileInfo () { string FileLine; string index; FileLine = "6 600 87 ...
[2 replies] Last: awesome! Thanks! (by Andym)
by rjizzo
Terminate a "For" counter loop
 
At the bottom of the following code, I created a "For" loop where you input the number of employees. I can get the code to compile and run, and you are able to ...
[1 reply] : !indentation <nolyc> indentation is optional whitespace. see also: !vo... (by ne555)
Factorial
 
Can someone comment out the following segment code? Also, what does the below paragraphs mean? Notice how in function factorial we included a call to itse...
[6 replies] Last: No. Factorial( a - 1 ). Factorial( 10 ); if it is > 1 it will multip... (by giblit)
C++ IO question
 
If I enter say 12 at the screen HW goes all the way to 38. Why doesn't end of line get detected after 2 when I hit the carrage return? #include <iostream> #...
[2 replies] Last: I was just thinking that was probably it. Thanks (by pronesti)
Input to parallel arrays
 
Hello, I'd like to apologize for posting a homework problem. I really try to figure these things out by myself, but I've been at this little problem for a few ...
[4 replies] Last: You were right, wrong file location. Thank you so much for your help!... (by chronomancer)
Template list
 
Write your question here. Hello, I'm doing a homework aasignment on templates, and i have to build a list. The problem starts when i am trying to add element...
[3 replies] Last: Simply store a copy, instead of a memory address in a pointer. templ... (by Catfish4)
dynamic template array classs
 
Hello everyone I am working on a exercise for a class of mine. I have been looking at this for too long I need a fresh set of eyes. In my dynamic_template_array...
[4 replies] Last: Thank you cire. (by otisphat80)
Why does this happen?
 
In the class selection If I type something other than y/n it repeats the loop 5 times. I can't seem to figure out why, all I know is that it does the loop 5 tim...
[1 reply] : that is a really ill-formed for loop and the program should have prope... (by giblit)
Help with a coin flip program
 
I have a coin flip program that flips a coin 1000 times and tells you each time if it's heads or tails. But it seems that sometimes it doesn't spit out either o...
[9 replies] Last: Thank you all for the help :) (by whatisjeff)
by zagzag
Switch statment
 
I have a switch statement where it counts how many times I input the number 1. However I just want it to store the increment the value when i put one digit whic...
[6 replies] Last: The problem was I had case '1': instead of case 1: you are right. I al... (by zagzag)
input problem/fscanf to int doesn't work correctly help please(fixed)
 
Hello, I have tried to make a fileloader function but it didn't worked. I have searched this problem on google but it didn't help. The load function bo...
[7 replies] Last: Thanks for the update. (by Chervil)
Syntax error with calling function with array of structs as a parameter
 
I'm having trouble with getting my syntax correct while trying to call a function, where one of the parameters for the function is an array of structs i'm tryin...
[3 replies] Last: Once I implemented your advice and then figured out that I was also tr... (by MongolSamurai)
by piczim
Returning incorret Answer
 
Please see below my code. I cant work out why I do not get the correct answer the answer should be 62.8 My code returns a result of 62 I am stumped! ...
[7 replies] Last: Thanks very much for all the help working fine now. Can someone point ... (by piczim)
Output of a vector
 
In a book, I've got a program to print a vector using iterator. Here's it: #include <iostream> #include <vector> #include <string> using namespace std; ...
[6 replies] Last: @andy you can also just add a count variable when using iterators but ... (by giblit)
Variables in “wait” functions
 
Hello all here's the first of many daft questions I imagine I will be asking as I learn to program a little better. I’m doing a bit of work on an mbed mi...
[2 replies] Last: Thank you that worked perfectly! (by Oddwired)
by yeki
Dividing
 
Hi all is there any place in C++ environment to help us, (like help in matlab or maple) Thanks yeki
[1 reply] : Use the float or double types (a double uses twice as much memor... (by Catfish4)
by a sk
Detecting the datatype of argument
 
Hi All - Question from a newbie. I have a print() function that I would like to overload. So, I would like it to work in both scenarios below: print(string m...
[8 replies] Last: Thanks again. (by a sk)
Help Payroll C++ for intro to C++ class
 
So, Ive been reading on this topic and it seems to have been mentioned before but I am still having errors appear with my program. The assignment is: Write a...
[5 replies] Last: You can also try this: Put "}" at line 55 Reverse "{" to "}" at line 6... (by JCM)
by ivo1
graph problem
 
Hello everyone.I have to write a program which returns the min(max) key values ​​of the peak for a given graph.So far I have been able to writte the part ...
[no replies]
June 2013 Pages: 1... 3233343536... 49
  Archived months: [may2013] [jul2013]

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