Remind define after declaration

my github home page: stupidgrass
“who am I, where am I” – declaration

Declaration means the first time one tell others he is in a new circumstance, just like a new file (int infile; //in b.cpp), a new block (int inblock; //in the block of main() {}). In the reality, one can repeat say “I am here” at anytime in the same place, but this is in the machine world, and the things should be kept as simple as possible. Therefore other repeat declarations will confuse the machine, “I already konw you are here and who are you, why you repeat again, does somebody want to cheat me?”
“Give the object a value” – define

One has a name, but he means nothing, just a sign. He has no power, just like the man in a fiction. Other knows his name, but don’t konw he. If some was cheated by the appearance of the “name man”, the terriable thing will happen – crash. So, don’t forget define a value after declare it.
One example in c++

In the class declaration.

class exp : public class base {
exp();
~exp();
}

In the class implement:

exp::exp() {}

I forget to implement the ~exp(). And a bug was appeared in the compling “undefined reference to vtable”, which confused me for some time.
Conclution

Remind define after declaration.

你可能感兴趣的:(define,declaration)