Beginners - October 2013 (Page 53)

In order to process input using < & output using > in command line what does the code need to look like
 
I have looked in many places but have not seen the specific answer regarding the use of < > in a command line prompt and what the code would be to use the input...
[1 reply] : As I understand it, the shell handles the piping so they are not comma... (by Zhuge)
stringstream repeating last item.....why?!
 
My code is below, the only problem I am coming across it that instead of the stringstream stopping after the last token has been evaluated, it is repeating the ...
[4 replies] Last: Thank you!!! That fixed....well that problem is fixed at least haha. T... (by truebluecougarman)
by elfeck
Double deref operator
 
Hello, I want to override the indircet and dereference operator: class Content { public: void myMethod() { } }; class Container { private: Content co...
[3 replies] Last: you shouldn't have a pointer but an object. (by ne555)
by sig226
Reading and calculating data from file
 
My goal is to calculate payroll based on information from a file. I need to distinguish between hourly and salary employees and apply overtime and taxes. I thin...
[no replies]
Unresolved externals, code doesn't look like anything is wrong yet won't debug
 
I have been staring at this for one hour and do not understand what I'm doing wrong. Debugger is saying I have unresolved externals yet everything looks perfect...
[6 replies] Last: I have a vague idea that, this is do with your project being configu... (by robertpires)
change the value of user-inputed string
 
I have a code where the user inputs a string against 2 options. Dog and Cat It then checks it against DOG/CAT dog/cat and Dog/Cat and goes to another function ...
[4 replies] Last: I think the op is inputting a string then he converts it to all upper ... (by giblit)
by Elaphe
Input help
 
I am self teaching myself C++, it's been a slow grueling process, but I am making headway. But, unfortunately I am stuck. This has got to be real simple. Howeve...
[4 replies] Last: Who know this would be so difficult? Is there a good tutorial on how t... (by Elaphe)
by jwilt
Inventory Count (w/ functions and i/o files)
 
Here are my guidelines. You are to write a program that will sum up inventory counts and report the total. The inventory is represented by a three digit inv...
[3 replies] Last: i'm outputting my code to a file and the console screen to see my outp... (by jwilt)
Value not updating when passed back into function
 
I am working on a problem that simulates a Roulette wheel at a casino spinning. The user enters the starting amount of money, chooses a type of bet, and the amo...
[3 replies] Last: I got the 'total_Money' variable working!!! Thank you for your help, I... (by Parasin)
digit program
 
Write a program that reads an integer and prints its digits. For instance, if the user enters -341670, the program should print the following lines: Digit 1 i...
[6 replies] Last: Sorry that was my fault. line 18 should be d - 1 instead of d. Reason ... (by giblit)
by mattho
What is being asked to be completed?
 
What is being asked to be completed? Is it just changing Maxn and running the program a few times? PURPOSE. To investigate enhancements to the GetTickCo...
[no replies]
How i write dynamic array in class?
 
How i write dynamic array in class? class Garage { int*Parks=new int ; } int*Parks=new int ; // the problem it's gave me wring in the delec...
[2 replies] Last: OK thanks a lot :) (by before190)
NESTED LOOPS
 
I need help on writing this ********** ********* ******** ******* ****** ***** **** *** ** * I figured how to do it the other way going down with th...
[1 reply] : 1) You should use code tags //stuff looks like: //stuff it makes... (by giblit)
Question
 
Hello, I have one question. If I read txt file in void function for example void ReadFile(const char CD ){ string name, something; ifstream fd(CD...
[3 replies] Last: You should be able to read and write to a fill as much as you want. It... (by giblit)
How do I fix this population program?
 
For this assignment, I am supposed to get a starting population, an annual death rate, an annual birth rate, and the number of years to display. I am then suppo...
[1 reply] : I'm not sure I understand how you calculate the projected population. ... (by Annatar)
Needing to take variables and do simple math
 
So far this is what i have. I have to take a persons name and age in earth years and convert it to Martian years. These are the Requirements the code must m...
[4 replies] Last: Thank you so much. (by kennyp5792)
how do i do this, pls help.
 
Write a program that computes the value of the mathematical constant π, using the following series: 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + ...... The program shoul...
[3 replies] Last: Another method would be something like this double compute_pi( const... (by giblit)
AQ2a.h:14:11: error: ‘double Job::getBaseprice()’ is private AQ2c.cpp:25:37: error: within this context
 
$ g++ -o trial AQ2a.h AQ2b.cpp AQ2c.cpp AQ2a.h: In function ‘int main()’: AQ2a.h:14:11: error: ‘double Job::getBaseprice()’ is private AQ2c.cpp:25:37...
[1 reply] : http://www.eelis.net/iso-c++/testcase.xhtml (I don't care for point 9)... (by ne555)
project euler 8th problem
 
I give up, I can't find a flaw in my code. It's supposed to "find the greatest product of five consecutive digits in the 1000-digit number." The output is 3175...
[1 reply] : I would like to mention you should work on proper indentations. inside... (by giblit)
Switch Statement Error
 
I keep getting the error: break not inside of loop or switch statement. Other errors include case "2" is not within a switch or a loop. What is wrong?!? #inc...
[5 replies] Last: Thanks, I'm a beginner so when I don't know what's wrong, I tend to ju... (by iceadmiral)
October 2013 Pages: 1... 5152535455... 86
  Archived months: [sep2013] [nov2013]

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