Beginners - February 2011 (Page 4)

If statement problems
 
Hello, I keep getting the wrong output. Is this correct? inFile.open("pa4.sales"); if (sales < A) // Bob { commission = ZERO; inFile >> name >> sal...
[2 replies] Last: 1. Can you please post the entire code? 2. What is the output that ... (by Danny Toledo)
by kuleee
C++ reading text file Problem
 
we want to read some data from text file and we want to assignment these values to x and y values..a data is just like below in tezt file: 30,59 23,54 45,65 ...
[2 replies] Last: thank you very much for your help:) (by kuleee)
by pauyon
Modulus question
 
Quick question, I am trying to find the remainder of 4/10, apparently I'm getting 4, shouldn't it be 0? Am I doing something wrong here?
[8 replies] Last: Oooohhh, okay, okay, I see how it works now! Thanks for the help! (by pauyon)
stupid question
 
Hi All, In a base class if I have a function in protected scope, I get that in private in the derived class. what if i want it in protected scope of the d...
[2 replies] Last: If you have a protected member, it will still be a protected member in... (by Bazzy)
VC++ 2010 vs 2008
 
Which would you use and why?
[2 replies] Last: I agree to use cross platform applications. Eclipse is available for a... (by bcthund)
by jyo76
error message: assignment of read-only variable
 
Hi, I am trying to make this practice program to calculate pay for an employee. I am using Xcode on a mac. I get the following error messages when I try t...
[9 replies] Last: lol, yeah just a bit Moschops... but at least u helped me get rid o... (by jyo76)
problem
 
Hi all. While i was reading this tutorial i found some problems.It was in the capter with the arrays.I read it all and got to the last sourse code.I compiled i...
[4 replies] Last: but there is no roblem anymore it was just the compiler now im using v... (by ooo1Adrian1ooo)
by ogward
string:find
 
Hi there! I'm trying to make a function that will search my array for a certain string and then show all the info about the thing thats on that place in the ...
[no replies]
partial template specialization?
 
Is it possible to have <void> as a template parameter? I know that it doesn't work generically, but if you write a specialization for it? Eg: template ...
[4 replies] Last: Well, from what I read here http://lifecs.likai.org/2010/04/c-void-tem... (by pabloist)
Template trouble? :(
 
So at the moment I'm trying to implement a templated InList class to keep track of various data types, but I am terrible with templates. And I don't want to use...
[2 replies] Last: Yeah, thanks for that, that was my problem exactly :) Passing NULL... (by KiraBox)
Hi there Sin/Cos function...
 
Hi there. I am taking a beginners c++ course and having problems using the sin and cos functions. It's have problems converting to radians etc even with the f...
[2 replies] Last: Thank you! Works perfect. (by Nickx89)
Problem with float algorithm (1,2)
 
actually this is my course project and i stuck at reverse algorithm "24h cycle format clock" Here is my issue Prof. asking me a member function that permit ...
[21 replies] Last: just write a member function and put cout << ... in it. http://www.cpl... (by hamsterman)
Enumeration Trouble
 
I'm sorry for asking so much but I'm having trouble with an assignment :P This program is supposed to take color inputs and check how many times 2 colors rep...
[3 replies] Last: As the tip I gave you specifies, enumerated variables are constant. Th... (by closed account zb0S216C)
Again i tried too many ways but i failed it's really hard i hate that
 
Suppose charges by a gas company are based on the user’s consumption, according to the following table: Gas Used ...
[3 replies] Last: You're going to need 4 variables: one for last months meter reading... (by Roastern)
Array of objects and pointers
 
I just posted the relevant code for my question. There is a declaration in main that is a pointer to an array of Competitor objects, followed by the creation o...
[2 replies] Last: yes. I know that is what happens when the new operator is used...The s... (by Wrecker)
Switch function
 
How do I get the switch function's default action to reject characters (A,B,C) as well as numbers that do not fit into its cases. Currently i can only get it...
[4 replies] Last: That's because cin >> choice will fail on non-numeric input. See http:... (by Bazzy)
Final Pi giving undesired output
 
This program is all but finished I am just having trouble figuring out how to display the last term in my sequence as a separate output after the other terms ha...
[no replies]
by nsydr
How does strlwr work?
 
I'm trying to write part of the string library myself for a class project. I'm stuck on strlwr. I can transverse the string but not sure where the char goes tha...
[2 replies] Last: Thank you. Now I know that it changes the string itself which solves o... (by nsydr)
I want to write this on C++
 
When you move toward a stationary light source, the wavelength of the light emitted by the source decreases. In fact, it decreases according to the following fo...
[5 replies] Last: http://www.cplusplus.com/articles/how_to_ask/ (by Bazzy)
by prcync
error in 'strcmp'
 
Copied this code from text book on Beginner C++: #include <iostream> #include <cstdio> using namespace std; int main() { int i; char str(80); char n...
[2 replies] Last: Duh!!!! & code tags are before and after code in our questions? ... (by prcync)
February 2011 Pages: 123456... 43
  Archived months: [jan2011] [mar2011]

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