ok cool, don't forget to delete what you new-ed. What is your question?

Also, if you really need to findFather, since it looks like it is being used extensively, consider adding another pointer in your Node. That new pointer would just point to its parent if any.

deepecstasy commented: Can't do, not allowed by teacher, +0

Take the BMP image, copy it into paint. Then save it as JPEG

@OP:
[code]
int userInput = 0;
const int QUIT = 8;
do{
cin >> userInput;
switch(userInput){
case ADD: doAdd(); break;
case SUB: doSub(); break;
case MULT: doMult(); break;
case DIV: doMult(); break;
case FACT: doFact(); break;
case QUIT: break;
default: doErrorInput(); break;
}
if(userInput != QUIT){ showMenu(); }

}while(userInput != QUIT);
[/code]

WaltP commented: Thank you for making my post a waste. -4

Easy enough, assuming some things.
[code]
int maxVal = INT_MIN;
int minVal = INT_MAX;
int input = -1;
const int END = -1;
while( cin >> input ){
if( input == END) break;
else{
minVal = std::min(minVal,input);
maxVal = std::max(maxVal,input);
}
}
[/code]

Read [URL="https://sites.google.com/site/tnuttysite/Home"]this[/URL]. It has very good explanation.

Orange gorilla and blue tires

[B]Can someone explain to me what I am doing wrong[/B]
EVERYTHING

This is what you want :
[code]

include
include

using namespace std;

int main(){
string line;
getline(cin,line); //read a line
/ do stuff with the line /
}
[/code]

WaltP commented: OP asked for what he's doing wrong, not just code that fixes the problem. -3

I did this for my university like 3 years ago. The exact same problem. I still have it, for a price.

jon.kiparsky commented: Funny. +0

darn double post. Well this post is useless. Maybe there will be something here that you
would find useful. But I doubt that anything in this post will be useful to you, whoever you
are. Well, at least I made this post worth something, in my opinion of course. So anyone here doing
anything interesting projects or whatever? I tried to make the most of this post. Well thank you for
reading and wasting a few minutes or seconds of your life. Goodbye.

[QUOTE=gahhon;1289995]can't to work with this, because user input is string type name (:[/QUOTE]
[code]
string stringName = "goshy";
char charName = "goshy";

cout << stringName[0] << " " << stringName[1] << endl;
cout << charName[0] << " " << charName[1] << endl;
[/code]

strings are made to replicate char arrays but be better

kings_mitra commented: Are you sure this is a C syntax !!! +0

[B]>>the best way to promote C++0x is to use it and teach it, yes[/B]

Lol, yes. But lets leave that to the C++0x forum.

What part of C++ troubles you, my young lad?

shankarz commented: if u know pls answer my doubt or else leave it, atleast others will answer my question... +0

Is it just me, or does it seems that people posting here are getting dumber and dumber? Dang if its this hard for you then, go work at McDonalds or something.

[QUOTE=tesuji;1247279]So all chars to be possible are numbers (0x30 .. 0x39) only ?

Why only should chars be converted into integers, aren't they already integers (0x00 ... 0xff) internally?

-- tesu[/QUOTE]

Actually, I mis-read his post. Sorry.

iamthwee commented: Naughty, naught :) -2

If its only 1-3 length, then just hard code it like so :
[code]
int toInt(const string& str){
int result = 0;
switch(str.length()){
case 1: result = str[0] - '0'; break;
case 2: result = (str[0]-'0')10 + (str[1] - '0'); break;
case 3: result = (str[0]-'0')
100 + (str[1] - '0')10 + (str[2] - '0'); break;
default: /
not supported */ break;
}
return result;
}
[/code]

Do something like this :
[code]
class Polynomial{
private:
std::vector coeff; //the coefficiants
public:
void getInput();
void printPolynomial();
}
[/code]

its pretty much similar to yours except I use a vector instead of raw arrays.
Now just implement the input and output functions.

Right now forget about creating games. Its over your head, unless you
want to use something like gamemaker or something similar.
First learn how to program. Pick a language, whether it be C++ , python,
C# or whatever. After you get a decent amount of experience in programming, then you can move on to 2d or 3d if you want.

bperiod commented: If asked for games, reply for games. +0

What are we even trying to measure

You are trying to measure BigO(), Big ) measures the growth rate of an algorithm. For example say there is a function f(n) , and that it follows the following inequality :

O( log(n) ) < f(n) < O(n)

the above inequality says that the function f(n) is bounded on top by
O(n), that means its worst performance is O(n). That O(n) is bigO(n).

It approximates how fast or slow the performance of an algorithm is.

To start your algorithm, depth-first-search is a well known one.
Its not easy to evaluate its performance. Thats why you can
quote whats already been proven. Take a look [URL="http://en.wikipedia.org/wiki/Depth-first_search"] here[/URL] and
read about its performance.

I guess you have never heard of templates. You can't use that code because it is an array-based stack implementation. You need to implement
an linked list based stack implementation. Do you know the basics
of a single linked list?

[B]I need some help writing code for a stack using link list implementation without using the STL[/B]
So your first task is to create a linked list implementation. Do you know
how to start ? Try it and come back.

It seems like you just wan't to ask question and not do any reasearch,
i.e be lazy. Did you think google did not have an answer to this
question? Google has answers to all. Here is a [URL="http://lmgtfy.com/?q=c%2B%2B+class"] answer [/URL] to your question.

Next step ? Pick one ;

1) Learn more about C++, for there is practically no limit.
2) Learn more about algorithms and data structures
3) Learn about design patterns
4) Pick a similar language, java , C# ?
5) Pick different language like haskel, php?
6) Go buy stocks?
7) Find a hot girl?

The Art of sorting?
The Art of searching?
The Art of finding shortest path?

Let me spell it out to you :

[B]main.cpp: In function ‘int main(int, char*)’: [/B]
Inside your main function
[B]main.cpp:15: error: no match for ‘operator
’ in ‘d * 1.0e+0’[/B]

There is no matching function function in the call :"e = d * 1.0;"

[B]derived.h:15: note: candidates are: double Derived::operator*(const Derived&) const[/B]

It even says it here, the only valid function is "double Derived::operator*(const Derived&) const"

a+b=23

Not taking into account floating points and just positive natural numbers. Then

if b > 23 then no Answer Possible
if b = 23, then a = 0;
if b = 22, then a = 1
if b = 22, then a = 2

General Equation : B = 23 - a OR A = 23 - b

Following this pattern b could be from 23 - 0 and a could be from 0 - 23
So there are 2 * 23 = 46 different solutions.

If thats not it then clear up what you want.

Rashakil Fol commented: A useless comment designed to congratulate oneself for knowing basic obviosity... only you messed up and made a mistake -1

[B] Except there is one difference between lions and humans - intelligence[/B]

And , humans have thumbs, they can walk with 2 feet, they do not
have as much as body hair( usually ), humans teeth are a lot weaker,
we do not have as long and visible tail (usually), our babier aren't
as cute, and we aren't as friendly( usually).

Rashakil Fol commented: WOW THIS IS SUCH AN INTELLIGENT COMMENT +0

Look into stl's list

Of all the stupid, inane things we waste time and money on that you could fill in the blank above which offer little positive value to humanity (unnecessary war, Jerry Springer, mindless, shallow celebrities, building bridges to nowhere, subsidizing tobacco...) and detract from important stuff we COULD be spending money on, I can't think of a less fitting example than trying to figure out what the missing link is.
It's an intellectual exercise that is the polar opposite of mindless, rote memorization of useless facts.

The reason is obvious. I picked this topic because of the billions of
dollars spent on this project. It is estimated by the United Nations' Food
and Agriculture Organization (FAO) that it takes about 30 billion dollars a
year to end world hunger. Some time ago we bailed out the Wall Street
with 23 times the amount needed to end world hunger. Its stuff like that
we need to avoid.

They're also the exact opposites of the types of teachers the guy who wrote the article you site hates, which are incurious, lazy teachers who just regurgitate the lesson plan.

Yes thats true. Generally those teachers have no idea of whats really
going on.

If you're lazy and incurious, you don't care about solving the missing link or any other problem.

Realize that I am not saying that we should stop this "curiosity" of ours
to obtain knowledge of our ancestors. I am merely saying that, we
should as for right now, stop it or ...