Beginners - October 2012 (Page 28)

File I/O Not Opening Input File
 
[Note: This was from a homework assignment, but I believe the code is all correct aside from this problem. A helpful hint or someone pointing out that I was mis...
[no replies]
questien about friend function
 
This is a simple example about friend function.I don't undestand writing rules about of friend function.in the example below: #include <iostream> using namesp...
[5 replies] Last: The classic friend function to learn is overloading the << operator in... (by AbstractionAnon)
Removing a specific card from player' hand
 
I've got this game of Spades, and right now I have two problems. I cannot seem to get the final scoring section of the code to work. It seems that it couts the ...
[1 reply] : CardGameFunctions.cpp Scoring function: void finalScores(SPlayer * ... (by LadyDustBunny)
by delmi
Displaying the menu using a void function
 
I am trying to familiarize myself with the use of void functions. I am not sure what I am doing wrong here. It is giving me an error. Any idea? #include<io...
[9 replies] Last: But when it output the Menu, it will not let the user choose what opti... (by CyraxNguyen)
String arrays in different functinos.
 
I'm just trying to solicit input from the user and save it in the array in a separate function. I cant seem to get the syntax right, and dont quite know how to ...
[10 replies] Last: Ha. I should Have seen that...I'm still stuck on the pointer thing...b... (by Aerion4)
Saving Data
 
in the following code, it runs but does not save data for some reason, can someone help me fix the problem? int main(int argc, char *argv ) { ofstream s...
[13 replies] Last: thanks (by brandonator)
problem typecasting output inside of an end-of-file while loop
 
I am having difficulty achieving the correct output that I want. I can't figure out how to correctly cast my INT variables to FLOAT outputs. First I infile (usi...
[1 reply] : You need to cast the int values to float or double, do this before you... (by TheIdeasMan)
by Ektor
Nested loops
 
Can someone tell me how I can get my loop to cout the grades that the user inputs. I tried putting a cout statement outside the while loop but it only shows the...
[4 replies] Last: This loop while (grad >= 0) is invalid because grad was not initial... (by vlad from moscow)
t displays all the possible times on a digital 12-hour clock, starting at 1:00:00 and ending at 12:59:59.
 
Hey so im trying to do some practice in c++, and this seemed like a good challenge. So far all i can do is get seconds to go up to 60, then all hope is lost:P h...
[7 replies] Last: I like the first one, that's what I was thinking. The second one will... (by TheIdeasMan)
what API is good for sound and graphics and easy to install
 
it must also have some future and tutorials...also i dont know anything a about mingw linkers bins and include .dlls and plenty of other bits and cant find anyt...
[1 reply] : maybe its to soon i hear you say...maybe i should pass some kind of un... (by devonrevenge)
Can not input values into variables.
 
the basis of my problem is that i am new to c++ and cant debug this myself. everything runs fine, the only thing is i can not input values into variables so th...
[9 replies] Last: cheers, works a treat (by lordgarth6)
2 Dimensional Array on heap
 
Hi everyone, I have quite a large 2d array in my program, and I was wondering if it would be possible to move it to the heap to ensure it doesnt overflow the...
[no replies]
Problem with my code
 
So basically im 14 and just startd c++, i bought a book and am self learning, im doing quite well but i am having trouble with my newest code. Please fix it, an...
[7 replies] Last: Thank you, :D i cant belive a lower case "R" was what was ruining the ... (by Qmechanics)
by BJzero
A quick question please help
 
how to save my value m after a for loop.. for example int main() {int m=0; for(int i=0; i<3 ; i++) {m=1} } i want m to stay 1.. how ?
[4 replies] Last: I don't see the connection, but ok. m is not destroyed after the loo... (by maeriden)
by rys
Help getting started with VTK
 
I am trying to learn VTK by starting with going over the tutorial Step1 using cmake. However, cmake does not work for me: I keep getting the message: CMake...
[no replies]
need help with some arrays
 
1. Get students ID (1-10) and their test score (0-100) for 10 students using two dimensional array. This should be in a function call GetInput. 2. Create a fun...
[5 replies] Last: I wanted to avoid doing the assignment for you, but I can't explain it... (by maeriden)
Why my program won't loop?
 
Below is my code, which works fine, with the exception of looping. I need to loop it so that the user will have option to enter the numbers again. Any help is a...
[1 reply] : cin.getline leaves the new line character in the input buffer. So next... (by vlad from moscow)
Creating A Simple Maths Game - Help!
 
Well I've Mad A Simple Maths Game But The Answers Are Fixed And I Need Help With A Way I Can Generate 2 Random 2 Digit Sums With A Random + - / or * Please h...
[2 replies] Last: Thank you very much! If only there was a thank user button I am very g... (by Adiminium)
how to use switch case instead of if statement ?
 
hi, i have this program below using switch case and i want to replace if statement that appears with switch case .. can i ? thanks for help :) #include...
[5 replies] Last: moschops : it's nicely done! thanks alot .. :) (by Mystic River)
Optimization?
 
My code is: //Title: Set6Exercises //Author: MacLeight //Date: 21 October 2012 //Write a function called OddCheck that takes one integer as an argument...
[3 replies] Last: You're welcome Extra tip: you should note that your IFs are redundant... (by maeriden)
October 2012 Pages: 1... 2627282930... 84
  Archived months: [sep2012] [nov2012]

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