Beginners - April 2015 (Page 22)

sqrt confusion
 
I am completely new to C++ but have a need to tweak some existing code. My problem is sqrt, which always returns zero. this is my added code const d...
[1 reply] : Heya, sqrt most certainly does return non-zero values- which you can s... (by ultifinitus)
by trasbd
Overloading the Insertion (<<) Operator
 
I am trying to overload the insertion operator for a class called resident . Whenever I run this, res.m_name does not out put unless I add an endl after r...
[4 replies] Last: Can you make m_name a string? (by S G H)
by enemy
T H I S S.O.S. ! ! !
 
Hello! Please, can someone write easiest example using keyword "this"? Many thnaks!!!
[14 replies] Last: Many thank!!!!!!! (by enemy)
by enemy
Copy constructor
 
Hello! Please, I tried to copy the first object using copy constructor and I do nto see mistake! Why is "another " not declared in this scope? Many thanks!!! ...
[3 replies] Last: Thanks!!!!! (by enemy)
by Bocian
Open text file in a function
 
Hi, i can't seem to figure this out, how can i open my text file when i call it in a function? The input parameter is a fstream but i'm not sure what to put in ...
[5 replies] Last: Ok,idk what you actually wanted to do,but heres the program I wrote fo... (by LadyInRed7)
How to give user specified names to a file???
 
Hey guys ,so yesterday I was to my tuition class and there the Sir taught us something of data handling.So I thought why not create a phonebook application(simp...
[4 replies] Last: Ok,so after a few ifs and elses,I made some minor tweaks to my program... (by LadyInRed7)
Brush Class
 
So I am out to use a Brush with windows easier. So far this is what I have. I am trying to get a hatched brush, thats the goal, but all is white. I know this b...
[no replies]
setprecision not working
 
This program has 10 different salespeople, and their total sales. The user puts in a bonus rate, and the program calculates and displays the bonus for each indi...
[1 reply] : Had to change the variables bonus and totalBonus to doubles, then it w... (by TheChang)
Basic Textmate help
 
This is probably a very stupid question but here goes. I am going to start learning C++, I did some C when doing my HNC course but have forgotten everything. My...
[1 reply] : First hit on Google: http://stackoverflow.com/questions/1008019/c-sin... (by AbstractionAnon)
Dictionary using Binary Search tree and AVL tree using files
 
I want to make dictionary using BST and AVL tree but i am having difficulty in file handling please help as soon as possible. #include<string.h> #incl...
[no replies]
Don't allow out of board
 
Hi guys, So I have a question... I have a board, and I don't want the user to write anything where the board isn't defined. For example, if I have a 10X10 boar...
[2 replies] Last: Oh, I didn't knew that was possible. Thanks! :D But if the condition ... (by Evenilink)
by wolfv
static scope question
 
There is something about static scope I am not understanding. Please explain the following output. #include <iostream> class A { public: static ...
[3 replies] Last: Thanks Cubbi! That explains it. http://en.cppreference.com/w/cpp/l... (by wolfv)
by cppS
C++ Parameterized constructor error
 
File Perceptron.h: class Perceptron { public: Perceptron(){}; Perceptron(int); int feedforward(float ); float rando...
[1 reply] : Perceptron p = new Perceptron(INPUTS_COUNT); should be: Perceptron ... (by cire)
Help needed about project
 
Hi.I have to make a project for the semester and have decided to make a polling station program.The user walks into the poll booth and enter his/her National ID...
[1 reply] : Can u Hlp me Solve MIne The program ' Project5.exe: Managed (v4.0.30... (by fuyu)
by HelenI
Game help
 
Hey! I'm helping a friend with a game and i have a very BIG problem. I have to check if the object1 is over the object2 (object1 collide with object 2). note:on...
[2 replies] Last: hi! the bullet is the same object with the marble...i have to find if ... (by HelenI)
by hmlwin
Program not handling properly when values are equal.
 
I am writing a program for my programming class. For one program we were to create an amortized loan program, and on one part we were to make it so that the use...
[4 replies] Last: ....and they are doubles This is most likely the problem. Read: ht... (by firedraco)
Finding the average for each athlete
 
I have to find the average of each athlete.But with my program ,the sum of the score score doubles up .And it affects my average of each athlete.How can I get a...
[no replies]
by Kman
Address book problem.
 
This is a really cliche problem, I know, but I'm still stumped. I have to read the first name, last name, phone number, etc. from an infile, but I'm confused be...
[12 replies] Last: input is an int. If you enter 1, 2 or 3 it will have the value 1, 2... (by cire)
Random Number
 
Ok I am have a simple issue that is eluding me badly for some reason I am running a simple loop to get a random num generator to guess 10 different numbers but ...
[8 replies] Last: I ran it and it just kept saying comp is to low , so I killed it.... (by Smac89)
Algorithms - Big O
 
Lately I've been trying to learn about algorithms, particularly sorting and searching algorithms. Generally I have found it quite difficult to grasp - not the c...
[8 replies] Last: Thank you, I understand now. (by Bogeyman)
April 2015 Pages: 1... 2021222324... 52
  Archived months: [mar2015] [may2015]

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