Beginners - April 2013 (Page 6)

Arrays - Using for loop to iterate through array explaination
 
Hi there, I am fairly new to C++. I am wondering why in my for loop I use i <= (ARRAY_SIZE -1); To me I read it as: 0 less than or equal too (3-1). Also when I ...
[2 replies] Last: Thanks keskiverto! (by flyingEagle)
HELP: Program for counting Even, Odd, Zero digits in an input.
 
Hey all. So, I'm relatively new to C++, and I have to write a program that will take an input and count the even, odd, and zero digits from the input number....
[7 replies] Last: it looks good! you are welcome good luck! @AbelX17 (by eyenrique)
Variable to hold multiple values - Trouble with While loop
 
Hello Everyone: This is my second program after Hello World, of if my issue seems elementary, is because I just got started. My program is supposed to as...
[4 replies] Last: while (yen !=0){ exRate = exRate * yen; yenTotal = exRate; ... (by ne555)
String Variables With 'Printf'
 
I was wondering how you'd print a string variable with the printf function. I thought that the code below would work since '%s' is for strings, but it just dis...
[2 replies] Last: Thank you very much! (by closed account D3pGNwbp)
by mnmnm
Modular program - rainfall statistics
 
The assignment is: Write a modular program that analyzes a year's worth of rainfall data. In addition to main, the program should have a getData function that...
[no replies]
by zyx459
beginning C++ through game programming third edition solution help
 
I need help with the first exercise on chapter 2. here is the exercise:Rewrite the Menu Chooser program using an enumeration to represent the difficulty levels...
[3 replies] Last: Thanks for all the answers! (by zyx459)
by Katt21
Incrementing variable
 
I know my title is vague, but I would appreciate it if someone could help me figure out how to keep the i variable from incrementing when none of the elements m...
[no replies]
Checking palindromes using stacks
 
i have a task which i have to use a class for as well as any data structure, i chose to use stacks a Anyway my problem is i tried to do the following code to ch...
[10 replies] Last: You shall add to your class member function top() that the top most el... (by vlad from moscow)
Whats wrong with my code???
 
Basically I've been coding for about 3 weeks, I am creating a calculator so I can do a lot more than I can on a normal calculator. I haven't been working on it ...
[4 replies] Last: By default the built-in trig functions work in radians. If you want ... (by JEvans1234)
by chondr
using victors
 
Write your question here. I'm trying to print out the last number of a victor so I used an int var called counter. How come it doesn't work? int main() ...
[1 reply] : The counter increases as many times as the loop on lines 14-18 execute... (by keskiverto)
help with functions of vectors
 
Ok I am working a project, finished all requirements, except I wrote my code under int main(), we were told to make all codes in a function and then just load a...
[9 replies] Last: updated version. I put the file into a string then ifstream ist(f... (by Melicalol)
by yes23
Taking a number from a value
 
Hi, I live in Turkey and trying to learn how to program. Sorry for grammar mistakes from the begining. I have a book, and I read first chapter. It has a test at...
[2 replies] Last: read it into a string and then parse the string and using atoi add eac... (by closed account Dy7SLyTq)
While Statement
 
I have searched my book and the internet for help with this code and couldn't find an example to help. I need to prompt the user for a number of temperatures...
[2 replies] Last: Your program seems to be completely C and not using any of the C++ fea... (by FSchwartz)
by Dawn76
While loop not working
 
Good Day. I'm having some trouble trying to figure out why the loop is not working correctly. I've looked at and compared to several similar programs, and I'...
[1 reply] : There are two main issues with your while loop: 1) There is no way ... (by Daleth)
Vending Machine Code
 
***edited 4-24-13*** The problem here is that I have been asked to use Functions to create the code and i dont really know quite how to do that. Other than "...
[5 replies] Last: Just a few minor errors if you guys could help out that would be great... (by collegeconfused)
So file i/o is completely useless?
 
You open up a file and take its data and use it in your program...except for the fact that when you open a file it's always empty????? I have this in one pro...
[4 replies] Last: Tip: Specify the complete path of the file in both programs. For exam... (by JLBorges)
by rwtwm
struct, class or global variables?
 
Hi, This is more a question of how to approach a problem rather than a difficulty with specific code. I'm pretty new to c++ and am trying to test what I've lea...
[6 replies] Last: I did leave out the implementation of the constructor: Bar::Bar( int ... (by keskiverto)
by devos
std::string&
 
i'm new in c++, i have a function for enumerating files in a directory : int EnumerateFiles(const std::string& target_path, const std::string& ext, std:...
[3 replies] Last: > Can you help me to understand this code ? If you are new to C++, y... (by JLBorges)
by Humar
Problem with isalnum,isdigit,isalpha etc conditionals
 
First of all, i apologize if this sort of question has already been asked and if i'm being a nuisance but i just don't know what to do. Alright, so i've been...
[3 replies] Last: i <= 3 will give either 1 or 0. So, you are actually doing this: isdi... (by writetonsharma)
Program doesnt run properly
 
Hi. I wanted to test if I have successfully understood simple classes so I wrote this and now I think I haven't succeed in learning classes! Here's my main.c...
[5 replies] Last: I thought it would be called itself! thanks. my problem is solved now. (by fmehri76)
April 2013 Pages: 1... 45678... 83
  Archived months: [mar2013] [may2013]

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