exactly i was talking about that.
not clear.The colon simply says that what follows will be an initialization list followed by the constructor
what is the equivalent code of that ?
your brackets are not properly written probabily
exactly i was talking about that.
not clear.The colon simply says that what follows will be an initialization list followed by the constructor
what is the equivalent code of that ?
your brackets are not properly written probabily
blue_gene
>what is the equivalent code of that ?
In this case:
>your brackets are not properly written probabilyCode:myClass::myClass ( int a, int b, int c ) { mya = a; myb = b; myc = c; }
...
My best code is written with the delete key.
yes,latter one i know and that is very simple . i also read about initialization list from my book.
i wonder, how many ways a simple thing can be made complicated !! there are many syntaxes for the same thing!!
anyway, its fine....ok
thanks
blue_gene
>how many ways a simple thing can be made complicated !!
You really don't want to know.
>there are many syntaxes for the same thing!!
Well, when it comes to initialization lists, there is a purpose. Create a class with a const or reference member and see how far you get trying to initialize it in the constructor body.
My best code is written with the delete key.
You all forgot about when using switches
Code:switch(variable) { case something: statement; break; etc.
Help populate a c/c++ help irc channel
server: irc://irc.efnet.net
channel: #c
>You all forgot about when using switches
>>but : is used elsewhere (bit fields, inheritance, labels)
My best code is written with the delete key.
You caught me prelude, I forgot about labels and bitfields, haven't done too much with inheritence yet, I still am learning c++. I guess the : operator is the misc. operator. Do all know all operator.
Help populate a c/c++ help irc channel
server: irc://irc.efnet.net
channel: #c