Beginners - November 2013 (Page 31)

Number checker + make it positive
 
So I have this piece of code I've been using a lot: while(!(cin >> x)) { cin.clear(); cin.ignore(numeric_limits<streamsize>::max(), ...
[no replies]
Need help with string and array
 
The result from running my code is perfect but I don't understand why this happened all the time #define RANGE 33 char S ={' ',' ','T','H','E',' ','C...
[1 reply] : What error are you getting? (by crimsonzero2)
Using switch to tell the time
 
how do I create a program to change the time from numeric form to words. here is an example enter time: 7 23 out seven twenty three am Can someone plea...
[no replies]
by Grea
balancing brackets crashing
 
I cant get this balancing brackets program to work, The problem I have is it keeps crashing when i try to open a file. #include <iostream> #include <fst...
[2 replies] Last: I think you should reexamine the control flow in your program (all tho... (by booradley60)
Array question.
 
Alright, so I'm trying to make a program that will allow you to enter the sales of 10 employee for three different months each, a desired bonus amount, then hav...
[no replies]
If you ....?
 
When you call an ofstream object's open member function, the specified file will be erased if it already exists... is that right? :S
[3 replies] Last: > When you call an ofstream object's open member function, the specifi... (by JLBorges)
by arya1
multipath inheritance in c ++
 
question: Expand the Employee Payroll program to include hourly based and salary based employees. This phase uses an array of employee objects, inheritance fo...
[no replies]
Where am I going wrong here?
 
It keeps giving me error: invalid operands to binary expression ('double' and 'double *')testScoreSum += gradeData .testGrades; Im sure everything else is ther...
[no replies]
What would happen?
 
What would happen if you put for loop this way? for(; ;) will it create an infinite loop?
[1 reply] : Yes, it creates an infinite loop. It is equivalent to (but less legibl... (by Chervil)
Allocation with many strings
 
So i have to generate 3kk diffrent 6-digit codes (i know its a lot) i wrote this program and it got quite a few flaws first and main problem is that everytime i...
[15 replies] Last: yup i tried lastest now and it took about the same ~1min (by Piotrifek)
Sentinel Help
 
I'm trying to have the program exit the loop when the sentinel is entered and I'm pretty sure it has something to do with reading m while inside the while loop....
[1 reply] : I think if you wanted it to error check after each input then you woul... (by Garion)
Random number
 
Hello, I am supposed to write a code that has the computer guess my number. The specification though is that the number is 4 digits long and only uses the numbe...
[8 replies] Last: uh sorry :D (by closed account 1v5E3TCk)
What's wrong with this code?
 
I need the program to display the number of names entered and display the names entered. I can't get this to work properly? Here is my code: #include <stri...
[8 replies] Last: I solved my problem. I put cout << "Number of students enrolled:" <<... (by super n00b)
by Garion
Using Namespace
 
I was reading about Namespaces and the general impression I'm getting from what I've read online is doing Using namespace std is a big no no. Should I star...
[7 replies] Last: I think I found a way to know what needs to have the std:: also. Sim... (by Catfish666)
by Garion
Number getting too large
 
Lets say I had a simple program to iterate an integer. Could I use an exception to stop the loop? I tried this but it seems to loop forever. It seems numb...
[3 replies] Last: Nobody. I'm just trying things until I understand how they work. I'm ... (by Garion)
How do you remove duplicate values from an array
 
Hello, I am writing a Go Fish! game in C++. I am currently working on my "checkSet" function. It identifies a set of cards and removes them from the player's ha...
[1 reply] : The basic function could be something like this: //Pseudocode -It... (by Mats)
C++ what's next
 
Hey guys , I'm still learning c++ " I'm on the functions now " , how to create it and call it, I'm already aware of if , switch , loops and basic functions. ...
[3 replies] Last: Yea, you can learn SFML and create simple games like pong, etc using i... (by The illusionist mirage)
by ephekt
changing an array class to dynamic array class
 
everything i have read says this should be easy and that you just add typedef double* DoublePtr; DoublePtr p; p = new double but where do i...
[10 replies] Last: We already did Project 11 in Homework 9. For this assignment, re-writ... (by ephekt)
can we return vectors in c++
 
lets say i have a function that fills an array with bits that are data payload that is for eyes when certain fields are converted hex. as we know, we can not ...
[2 replies] Last: HI! Yes, but since you haven't posted code, I cannot give more speci... (by density)
Expected declaration before token '}'
 
HI all Please help with this problem. I think its quite small and I have been looking at it for ages but cant work it out?? The error I get in the code is as...
[8 replies] Last: Thanks. I will look into it further. There must be some issue with my ... (by bennyscammin1)
November 2013 Pages: 1... 2930313233... 80
  Archived months: [oct2013] [dec2013]

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