Beginners - March 2011 (Page 49)

Validity checks using Loops C++
 
I am trying to compose validity checks using any type of loops on C++. For example, if the user does not input a certain integer or character that fits in a cer...
[15 replies] Last: Thanks a lot for all the help guyshttp://www.cplusplus.com/forum/begin... (by davidrca)
c++ code
 
code for conversion of infix expression to post fix expression.
[no replies]
float to GLfloat
 
would it really make any difference if I changed a variable from float to GLfloat before i used it in functions like glTranslatef() ?? ~Cheers! navderm
[no replies]
Math Skill Required
 
I've been at C++ programming for about 2 weeks now and am starting to come across some harder math concepts. My question is how much knowledge of math should I ...
[8 replies] Last: Like hanst99 said, people tend to greatly exaggerate the difficulty of... (by Browni3141)
Undeclared identifiers in a class
 
I'm trying to modify a class (i.e. I'm hoping it's one small thing that I forgot to change and not actually 38 errors) to use dynamic arrays rather than a stati...
[5 replies] Last: Ah ha. Thanks for the reply. Still not used to writing with classes ob... (by Greywolfe1982)
virtual functions
 
c l a s s S t o r a b l e { p u b l i c : v i r t u a l c o n s t c h a r * g e t _ f i l e () = 0 ; v i r t u a l v o i d r e a d () = 0 ; v i r t u a...
[1 reply] : Can you fix the spacing? And yes, writing virtual on one method makes ... (by Zhuge)
wrote code, compiles but no output......any ideas?
 
So I wrote this program about candy bars and it compiles but displays nothing, no error messages. Yes, I'm new to C++ but I think I wrote this program correctl...
[6 replies] Last: You are accessing snack , which is out of bounds of the array. You al... (by turbowhat)
Hopefully simple question regarding nodes/linked list
 
I am trying to make a linked list and have followed the advice of numerous tutorials but I am having a very basic problem. Regardless, here is my bit of code: ...
[12 replies] Last: Thank you so much for your help! Hopefully I'll be able to make some p... (by kultrva)
by Smitty
Compile Errors, Review my Code
 
I just reconstructed my new code and am having trouble. When I try to compile it I keep getting an error message. At the end of the program something is wrong, ...
[2 replies] Last: finally got it. That else statement wasn't needed. Also I realized ... (by Smitty)
kant think of a title at this time
 
ok i want to know if there is a way in a program to do what some games do and say like hit space (or another key) fast and if you dont hit it fast enough then s...
[8 replies] Last: Wait, you're using Dev-C++? If you are, please switch to something sti... (by Albatross)
How to loop a set number of times?
 
How can I loop a statement a number of times? aka int loopnumber Loop statment int number of times { my looped info goes here } How woul...
[7 replies] Last: Nobody ever said that END_VALUE in Zhuge's example had to be a constan... (by Albatross)
Just Wanted to Say 'Hi!'
 
I just joined the other day and wanted to just say 'Hi!' I am fairly new to C++. I have a basic understanding of variables, function, classes, loops, etc., ...
[6 replies] Last: Well hello, hope you enjoy your stay. Not to be a killjoy but this sho... (by quirkyusername)
Whats the use for pointers?
 
I just recently began learning code, and I'm in the portion of my book where it explains pointers. I understand them completely, but on all of these forums, ev...
[3 replies] Last: Well, I wouldn't go that far. They are much more important in C than C... (by Zhuge)
sorting a character array in a structure
 
Hi, I was hoping to get a hint on sorting a character array, part of my homework assignment. // This is my structure struct item{char name ; int mark1;...
[4 replies] Last: You should compare for > 0, as strcmp() can technically return any num... (by Zhuge)
by Smitty
Urgent question with my program regarding looping and setting limits.
 
How would I create a simple loop so that the person using this program (user) can keep inputting weights until they want to quit. Also, I need trying to crea...
[1 reply] : Um... what are you trying to do on line 16? What I'd do is set wei... (by Albatross)
by hagarr
loop
 
I'm doing an assignment for school. The program is used to calculate how many months it would take to pay off a loan. The stuff after the loop is just temporary...
[8 replies] Last: There was a problem with my declaration of the intPerMonth variable be... (by hagarr)
stock in second part of Pancake Glutton exercise
 
Write a program that asks the user to enter the number of pancakes eaten for breakfast by 10 different people (Person 1, Person 2, ..., Person 10) Once the dat...
[1 reply] : So what exactly is the problem you are having? In other words, how is ... (by Zhuge)
Saving numbers to variables? Probably simple
 
I made a code that finds all factors of a number, I'm looking for a way to save each factor in its own variable. I'm an absolute newbie at this so it's probably...
[no replies]
virtual base class
 
Hi All, as we all know if i have a base class A and i derive two other classes B and C like this: class B : public virtual A {}; class C : public virtual...
[4 replies] Last: @jsmith: this is a code I found in stroustrup class Componenet : p... (by navderm)
by Smitty
Question about precision in Code.
 
I want to set precision to 2 with the results. Does that mean that I have to put << setprecision (2) << after every weight on each planet or is there something ...
[1 reply] : you can call cout.precision ( or cout << setprecision ) before line 35... (by Bazzy)
March 2011 Pages: 1... 474849505152
  Archived months: [feb2011] [apr2011]

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