Beginners - October 2013 (Page 52)

by Lynst
Code::Blocks While Loop Issue
 
I don't see anything wrong with this code, yet, I keep getting this error: "error: 'While' was not declared in this scope" #include <iostream> using name...
[2 replies] Last: Well first I figured out that there's a huge difference between W hil... (by Lynst)
EOF LOOPS????
 
This code is from my book and I even tried it on visual studio; however, I don't understand what it does and how it works. It is an EOF loop, but im not underst...
[2 replies] Last: It is an EOF loop, but im not understanding the concept. It is not ... (by cire)
Desperately need array help
 
Hey everyone I'm struggling with arrays and need some help with this program. I really don't understand why this is giving me -nan for a output. Seems like what...
[5 replies] Last: You may also consider putting in a second while loop to catch any grad... (by Parasin)
class problems
 
Alright I am doing a project for different class and I think I have everything good but I cant get this line of code to get past without giving the error code a...
[4 replies] Last: Actually, its because "balance" is being defined in multiple files, du... (by TwilightSpectre)
Method to make graphics move.
 
I'm really not shur where to start on this method. Especially when it comes to changing the speed and making the arrow keys work. Any help will be appreciated, ...
[2 replies] Last: The speed is the distance moved over the amount of time passed. I ... (by Duthomhas)
factorial program
 
The factorial of a non-negative integer n (written n! and read n factorial) is defined by n! = 1 ,if n = 0 or 1 = 1*2*3*....n, if n > 1 So for instance, 3! = 1*...
[10 replies] Last: because you have the output inside of the for loop switch line 14 and ... (by giblit)
Returning by reference
 
Whats the difference between returning by reference and returning the variable? Also: would a getter that returns the reference of a variable allow the...
[2 replies] Last: Thanks. (by IWishIKnew)
Check if a string only contains ints
 
can someone either just tell me or point me to an explanation of how to check a string to see if it contains only integers? No doubles, no floats, no negative i...
[1 reply] : plain old ints Negative integers are also plain old ints, them being... (by vasilenko93)
Good Beginner games
 
What are some simple, console games for beginner game programmers???
[3 replies] Last: Good question since this way allows steady improvement of programming ... (by rodiongork)
variadic templates for timers
 
For the timer system I figured you would want to define a Timer object that would hold the delay, function pointer, and the arguments to be passed. But of cour...
[no replies]
by mattho
Continuing the function
 
Hello I have a problem of where it won't output the other results. It stops after the first function. My main goal of this code is to output the middle characte...
[7 replies] Last: now this is the output .. so am i having too many cin while statements... (by mattho)
win32 button function
 
SO with MS visual studio I am having trouble getting an output from my button and how would i do it without messing up the rest of the code and where it should ...
[no replies]
by adv100
understand for loops
 
I am new to this and trying to understand for loops. I put this in the computer # include <iostream> using namespace std; int main() { in...
[5 replies] Last: Thank you very much! (by adv100)
Reading in ints and chars from a same file
 
Hi. Would someone please help me with this. I'm trying to read in a sequence of integers from file but there is a possibility that the file will accidentally...
[14 replies] Last: Oh, I see. With getc I'll have to go back to checking for all those ... (by Stremik)
having an issue getting a value from a void function into the parameter of another function
 
I'm having issues with compiling a program for an assignment. You can see what I'm trying to do from the code but it's essentially typing in a number between 1-...
[8 replies] Last: Just to make explaining easier, I've rewritten your getScore() functio... (by xismn)
How to read certain line from .txt file
 
How can I go about reading the last ten lines from a .txt file? This is what I have so far #include <iostream> #include<string> #include<fstream> ...
[no replies]
by Ggnome
strange results running a fstream loop
 
So I'm trying to count the number of words in a file in such a way that multiple spaces or breakliines will not effect my answer. The goal of the loop being to ...
[5 replies] Last: thank you, and well damn, that does do it, I must have missinterpreted... (by Ggnome)
by kay19
C String processing/Atof
 
I want to enter a value as a C string in the form: xxx,xxx,xxx,xxx.xx. I would input 1,000,000 or 1,000, while using the atof function, and the code would just...
[2 replies] Last: Thanks for the reply Yanson. Appreciate the help, will now try to und... (by kay19)
Determine if a relation is reflexive
 
Hello all, I am working on a program that will look at a relation and determine if it is reflexive or not. So far I am able to go through the pairs and determin...
[no replies]
Evaluating postfix
 
Hello all I am stuck trying to write a program that reads in an expression, turns that expression into postfix, and then evaluates it. The program reads in the ...
[2 replies] Last: Hi zeppelyn sorry I didn't see your comment. If you add breaks after e... (by trevormoon)
October 2013 Pages: 1... 5051525354... 86
  Archived months: [sep2013] [nov2013]

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