Beginners - January 2014 (Page 35)

Program doesn't calculate
 
This is part of a code I’m working in, and for some reason it doesn’t work. It doesn’t matter the values I enter for h and min, it’s returning GT = -off...
[7 replies] Last: Oops didn't see that clearly. Sorry my fault. Aceix. (by Aceix)
by wolfv
error with static key map
 
This error is driving me crazy. I have reproduced the error in the simplified example below. The last code tag contains the same example in one file, and it...
[4 replies] Last: Just to explain, The makefile originally had: a.exe: main.cpp map.o ... (by Lowest0ne)
Graph Representation
 
I can't quite understand how does this code work as i do not really understand how to use the map and vector containers. Can anyone please help? Thank You. ...
[1 reply] : Maybe reading the references can help? http://www.cplusplus.com/refer... (by kevinkjt2000)
Program to replace letters, multiple times.
 
Hello, I've written a program that asks the user what letter to replace, and what to replace it with. It runs, and works as it should the first time, however...
[9 replies] Last: > what is the meaning/purpose of the .rdbuf() Read (the opening few p... (by JLBorges)
Finding the minimum, maximum and mode of a string.
 
Sorry for the insanely long void parameters. I was sure this would work but I got a wall of weird errors. I'm guessing it's logical. This is my first attempt at...
[4 replies] Last: // Find the min, max, and mode of a string #include<iostream> #includ... (by ValliusDax)
Controlling number of loops for a password program
 
Hi I am creating a simple password program. The program requires the user to enter an account number and password. The following code works fine however the onl...
[3 replies] Last: In the code below the integer loop_count is initialised to 0, each tim... (by ValliusDax)
Sum of digits
 
My assignment is to have the user input an integer, output each digit and then add the sum of the digits. I've outputted the digits, but now I need to know how ...
[10 replies] Last: #include <iostream> #include <string> using namespace std; int main(... (by Yanson)
by azad90
Generate X in 2D board
 
I managed to create a 2D board containing random numbers. My task now is how could I mark "X" in that board once any number in the board is selected by entering...
[2 replies] Last: Dear ats15, When you select the desired number, put a value outside ... (by azad90)
Newton's Second Order Formula
 
Does anyone here know what's the formula for newton's second order method in finding roots of equation in one variable? Please tell me what is it. Thanks!!!! ...
[2 replies] Last: thanks much. (by newton123)
Uncertain with a piece of code
 
So im looking through some tutorials for SDL and i stumbled upon this piece of code, i more or less know what it is doing, but im just uncertain because some of...
[1 reply] : timeText.str( "" ); That clears the contents (not the state) of the... (by jaded7)
How to read data from text file.
 
#include <iostream> #include <fstream> #include <cstring> using namespace std; const int MAX = 80; const int MAXNO = 5; enum Title {Miss, Mrs, Mr, ...
[3 replies] Last: #include <iostream> #include <fstream> #include <cstring> #include <c... (by Yanson)
How do I scan a floating variable?
 
I know that if I want to scan an integer-type variable, I must use the %d. For example, on this program: #include <stdio.h> #include <stdlib.h> int main () ...
[2 replies] Last: Thanks a lot. I've searched in the site, but I couldn't find it. (by Marcial)
New Sum of Digits
 
I'm trying to output all of the digits in an integer with spaces in between, and then output the sum of all the digits. It isn't compiling correctly. Any sugge...
[1 reply] : Please do not double post. Somebody will help you on your original po... (by kevinkjt2000)
declare in base and define in derived class
 
Is it possible to declare a method in base class and define in derived class? I'm struggling.. //base.h class Base{ protected: int value; public: vo...
[3 replies] Last: thx for replies guys (by unstoppy)
by JohnJH
Operator overload
 
How come is this incorrect? class car { public: car(int); int HorsePower; int getHorsepower(); car operator == (const car,car rhs){ ...
[3 replies] Last: I'd also like to point out that by convention, overloading operator==... (by yulingo)
Help, problem with struct and vector! (1,2)
 
Hello! I am trying to make a simple notification system. I want to type in first name, second name and your hometown club for like 5 to 10 different people. The...
[29 replies] Last: > The program should generate different start lists for each cout, and... (by JLBorges)
Rescue Me!!!!
 
I am writing a program that solves for the root of a polynomial using newton raphson method.Newton-Raphson has the following algorithm: • Make one initial gu...
[3 replies] Last: You should probably have a derivative be calculated using the power ru... (by kevinkjt2000)
by Alby94
Namespace
 
Untitled1.h #include <iostream> namespace mynames { class string; }; class string { public: char s ; string operator= (const char*); }; ...
[2 replies] Last: thanks! kevin! (by Alby94)
by Alby94
Template of functions
 
The program report me an error in run-time.. #include <iostream> using namespace std; template <class tipo, class tipo1> class vettore { private: in...
[2 replies] Last: Thanks!! (by Alby94)
Always no sign change
 
I have my code below that lets the user inputs the order and the corresponding coefficients of a polynomial. This code will run but it is totally wrong..A sampl...
[4 replies] Last: line 81 is a problem, initialise s, don't assume it will be 0.0 by def... (by tipaye)
January 2014 Pages: 1... 3334353637... 44
  Archived months: [dec2013] [feb2014]

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