- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 5
- Posts with Downvotes
- 5
- Downvoting Members
- 3
Re:
After i key in 20 different value of float, what command should i use so that i can determine the largest and smallest value from these numbers ? |
|
Re:
The last time I was making a program, I wanted to input from user a boolean answer (to save space ;)) An input of 0/1 works good (0-false) and (1-true), but if the user inputs the boolean values as "true" and "false", it comes out to be an error. So, … |
|
How can this BST class be better? [code] #include <iostream> #include <iomanip> #include <stdlib.h> #include <time.h> #include <conio.h> using namespace std; template <class KeyType, class ValueType> class BST { public: BST(): mroot(0), mcount(0) {} BST(BST const& tree) { *this = clone(tree.mroot); } BST& operator=(BST const& tree) { if (this != … |
|
Re:
I'm having trouble getting a recursion template reduceArray() function to divided elements in an array. I have +,-, and * working fine, but division is not working for me. The function should take the given elements and divide as follows ((((4/2)/7)/1)/9) Here's my code...any tips? [CODE]#include<iostream> using namespace std; template<typename … |
|
Re:
Hi, I'm a newbie, as I just joined this community. I live in the New York Metro area. I'm interested in exploring IT related fields and found a program in Networking offered through a local community college. I realize these are different areas, however, I've noticed that they're often lumped … |
|
Re:
My problem is that my program doesn't print out the first number in the sequence. Like if i ask it to print out 10 numbers it will only print out 9 numbers and skip the first number that it should start with. example of the output is at the bottom … |
|
Re:
[code] string& f() { string str = "name"; return str; [/code] I need to return a reference to a string,but i am confused how to return corectly from f(),any help ? |
|
Re:
[CODE]#include <iostream> #include <string> #include <conio.h> using namespace std; int main(){ string ans =""; string ans2 =""; char ch; cout << "Enter 1stplayer:\n"; ch = _getch(); while(ch != 13){//character 13 is enter ans.push_back(ch); cout << '*'; ch = _getch(); } char chs; cout << "\nEnter 2ndplayer:\n"; chs = _getch(); while(chs … |
|
Re:
Hi,here is another interesting problem that will make you think. The tower of happiness is located in the garden of effort.Happiness is waiting for you in the top chamber of the tower.The stairs that lead you to the chamber has N steps and you are allowed to climb up one … |
|
Re:
Hi, I have a question about constructors and the difference between passing by value and by reference. If you look at the two examples I attached. Example one has a constructor that passes by value and example two pass by reference. Now I want to know why example one will … |