Beginners - October 2013 (Page 12)

by mv81
cin not working
 
Was wondering if anyone can help me figure out why the cin in my program is not working. When i run it only the first cin works. #include <iostream> //Requir...
[1 reply] : You should be using a string for name. All your variable's are set as... (by Pebble)
Payroll Program
 
qstn: Write a program that displays a weekly payroll report. A loop in the program should ask the user for the employee number, gross pay, state tax, federal ta...
[3 replies] Last: by tawsif95: Do not accept negative numbers for anything. Write ... (by mobotus)
validation loop trouble
 
The problem I am getting now is that I can input random things the 1st time and it works right but on the 2nd try it will take wrong inputs. EX: 1st input chess...
[no replies]
Calc
 
So the user enters something like x = sin(4y^2) I want the program to solve the equation.
[9 replies] Last: Is there a smaller parsing technique that I can use? (by RealGiganitris)
Hints on reverse polish calculator program. Headed in right direction but stuck with a few questions
 
I've been working for the past week on and off on this program. Its not due until the 29th but I thought it would be a good idea to get a head start on it. The ...
[5 replies] Last: You need header guards, to prevent the header from being included twic... (by Chervil)
by mv81
C++ help
 
What would i use in a c++ program for the program to give me random a set of numbers.? I am writing a program that adds two random numbers and display the an...
[9 replies] Last: Alright i got it. Thanks for the help!! (by mv81)
by Nata
Currency converter
 
Hi this should be currency converter could you tell me what is wrong here? Thank you #include <iostream> using namespace std; int main() { int...
[4 replies] Last: Thank you!! I am new at this and I cannot quite get everything well!! ... (by Nata)
Cin not allowing input
 
When I use the second cin, the command line just sits there with the blinking cursor and doesn't allow any typing, if I put a getchar(); after the first cin, it...
[2 replies] Last: I should have specified that I already tried that, that's what origina... (by dmpaul26)
How to use cin as an argument ?
 
Hello. How could I rewrite the two following lines without using the input variable. cin >> input; scene->update(input); Thank you.
[1 reply] : you could create a function: string input(){ string input; cin >... (by CLman94)
loops
 
what do i need to do to loop this 10 times i keep trying to put it in a while loop because i dont know enough about a for loop. when i put it in a while loop...
[6 replies] Last: srand(time(NULL)); for(nblancer = 1; nblancer <= 1000000; nblancer*=... (by Skinnyjr)
Prime numbers in order
 
Greeting to all of you, who wish to help me. I tried to make a program, in which you could say which prime number you wanted to know, for example the 23rd , ...
[8 replies] Last: Thank you, your code helped me a lot and now it finally works! :D (by MazzFraps)
Undefined behavior?
 
So for a class project, I need to write a program that will take the first word ( a contiguous sequence of letters delimited either by non-letter characters or ...
[3 replies] Last: > but is there a chance for undefined behavior There is undefined beh... (by JLBorges)
Can someone please explain this pointer line to me?
 
I was making a vector inventory program and ran across an issue, since I needed to display the get function of a child class from the parent class (as you can...
[3 replies] Last: Yeah the issue is that my real program (this is just to show the examp... (by Tiger58)
by Ediie
Problem C: Voting
 
Hi guys, I need help with an assignment. I'm very new to C++ (in 8th week of learning) and I don't know where to begin with this assignment. source file: vo...
[2 replies] Last: That's it? I thought you have to put "int" and more, but that's it? (by Ediie)
Making a simple calculator
 
I'm making a simple calculator using only +,-,*,/, and % as the operations. I'm having trouble as to why my code will not run. When i compile the code, it gives...
[3 replies] Last: Thank you so much Danny Toledo! It works! This may sound like dumb que... (by Jinstry)
Bingo Game
 
Uhm, so hello! We have this project in our CS course that states that we have to generate our own Bingo Game program, we can use help or we can let a person/peo...
[1 reply] : @passionateswimr I compressed the filling of the bingo card columns. ... (by whitenite1)
appending one string to another?
 
Hi guys, I am trying to take 2 user input strings and add them together. I have one string text and another string extra . I want to output both of these ...
[2 replies] Last: Oh, awesome! Simple enough LOL thanks! (by MJGilbert)
code help pls
 
#include<iostream.h> #include<conio.h> #include<fstream.h> #include<stdio.h> #include<stdlib.h> #include<string.h> class employee { private: int empn...
[4 replies] Last: thanks i figured it out (by cyberdude)
Fishweights Problem
 
You are doing statistics on salmon fish weights randomly sampled from Maine lakes. At each of several sites across the state, data is collected weekly and give...
[5 replies] Last: #include <iostream> #include <iomanip> #include <fstream> using names... (by mmy23alxo)
Making graph in c++
 
Hi, I want to make a program that gives you a graph with "*" and "." , "*" are % of how much work has been done and "." how much work has to be done. There ca...
[4 replies] Last: Of course you can, and that's how you do it ( depending what you want ... (by Zaki Al Qudah)
October 2013 Pages: 1... 1011121314... 86
  Archived months: [sep2013] [nov2013]

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