Beginners - March 2014 (Page 38)

by dcradu
OOP issue
 
I have the next classes: Engine, ElectricMotor, IgnitionSystem1, IgnitionSystem2; the ignitionSystems' constructor is IgnitionSystem(Engine&, ElectricMotor&). ...
[no replies]
Number Guessing Game
 
I'm trying to write a number guessing game but for some reason, it will not continue to ask you to write in a number. Can anyone explain? #include <iostre...
[1 reply] : It will only loop through because that is exactly what you tell it to ... (by CodeGazer)
How to terminate a program when the time is up in a quiz program
 
Hi guys! I'm a beginner at C++ and I want to make a quiz program that is timed. I want that when the time is up, it immediately clears the screen and display a...
[6 replies] Last: SFML has a nice thread component to their library as well: http://www.... (by Computergeek01)
Explain please
 
Please explain Give the output of the following program 2 #include<iostream> int global = 10; void func(int &x, int y) { x = x-y; y = x * 10; cout<< x <<...
[9 replies] Last: [quote=Suma Menon]so i need to know the meaning of each code. If you... (by Catfish666)
How can I know the end of line of a text file?
 
I have a text file "RPN.txt". 2 3 4 + * 7 4 3 + - 2 + 12 46 + 23 - 1 5 + 8 4 1 - - * 6 3 - 5 * 9 + 12 23 11 + 45 * + 2 11 + 4 7 + * 231 111 + I have to proces...
[8 replies] Last: Thanks all! Finally I have used the getline . (by Nikko YL)
How to split a string in C++?
 
What's the most elegant way to split a string in C++? The string can be assumed to be composed of words separated by whitespace. (Note that I'm not intereste...
[1 reply] : Interestingly this question was asked in verbatim before (spoiler aler... (by Catfish666)
classes
 
can some on link me to a page that shows all the classes(maybe not what its called)and all of its functions it contain this is what im taking about #...
[1 reply] : See the 'Reference' page on the sidebar of this site? That is exactly ... (by TwilightSpectre)
Dev C++ compilation error
 
Hi! I am new to dev c++.The program works good for the first time.Whenever I try to modify the code and compile it again it displays compiler error Permission...
[9 replies] Last: Another thing to test: Is your disk write protected for some reason? I... (by TwilightSpectre)
How to calculate a % of a number!
 
Hi Guys, I just started´my class this week and I have a simple question! What is the code for calculating a percentage of a number? For example: Bala...
[7 replies] Last: You're welcome! Glad it worked :) (by MikeyBoy)
Enums in C++/CLI
 
Hi, I have been attempting to learn visual c++ recently. The book that I'm reading showed an example with enums in C++/CLI. #include "stdafx.h" using namesp...
[2 replies] Last: Opps sorry I forgot to write that. I'm using Visual Studio 2013(The bo... (by wiireless)
Please explain this... for my exams
 
Please explain this to me. this is for my exams. class Metro { int Mno, Tripno,passengercount; public: Metro(int Tmno=1) {Mno=Tmno;Tripno=0;passengerco...
[4 replies] Last: Have you tried stepping through it with your debugger and look at vari... (by mutexe)
help with taking sum of values within anarrays
 
Hi i have this assignment about making a program that urges the user to input the number of values to average. Then the program asks user to input the values on...
[1 reply] : Line 8: Support for VLA is not in standard yet. When the compiler com... (by keskiverto)
Bytes
 
Questions is How many bytes will be required by an object belonging to class AUTHOR? and how this is calculated? class PUBLISHER { char Pub ; double Turno...
[3 replies] Last: On my machine sizeof(AUTHOR) is 80, not 70. It depends on compiler a... (by MiiNiPaa)
Passing String Array Problem
 
Just want to say thanks ahead of time first and foremost. I am trying to pass make and model by reference to my function to run a bubble sort and then call it...
[1 reply] : Just something to point out: What is with line 37? Also, you don't app... (by TwilightSpectre)
Operator overloading with fractions
 
I'm sort of lost on how to write code that allows for the multiplication, subtraction, and division of fractions within a fractions class. Could anyone give me ...
[1 reply] : Say you have a class fractions. Simply add in operator calls for eac... (by TwilightSpectre)
Please explain how to get the output
 
Please explain this to me Find the output of the following programme: # include < iostream.h> void Withdef (int HisNum = 30) { for (int 1=20 ; I<*= HisNu...
[2 replies] Last: Thank you very much (by Suma Menon)
Random number
 
This is for my exams. Answer is 19:16:15:16 PLease help me to understand how to get this answer The following code is from a game, which generates a set ...
[16 replies] Last: Thank you very much. doubts cleared now very well. (by Suma Menon)
by kiino
Ship Problem
 
You guys probably noticed by now that this is my third question in a row lol. Sorry about that but I decided to work on as much different problems as I can and ...
[5 replies] Last: You are never calling Print2() as far as I can see. Maybe that is wh... (by TwilightSpectre)
Problem with operator overloading
 
I'm a little confused about using operator overloading with fractions. I want to have a member function that allows the display of an object's data vallues. I a...
[6 replies] Last: Okay that is very helpful. Can I make an array to allow the user to ch... (by lizardqueen)
Specific output questions.
 
Hi all, beginner here so please bare with me. I want a user to enter as series of integers, then terminating the program when the a vale of =<0 is entered. T...
[4 replies] Last: I do not :(. I did however manage to write it down and it compiles and... (by i11u5iv3)
March 2014 Pages: 1... 3637383940... 79
  Archived months: [feb2014] [apr2014]

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