|
|
My sole intension was to validate the thing I put here...If there is any conceptual missunderstanding , u may please state here.
|
|
|
|
|
You can see things as 'encapsulation' also: it is a little bit the same concept. Each object retains its state (that is not directly accessible for the external world) and you can modify it by the use og public functions.
I think it's the same as what you said.
|
|
|
|
|
i still don't understand the whole thing you expllain/ask for (if ever), but if you use a bool, then your object will have only 2 states : ON/OFF, enabled/disabled, true/false...
so, i'd suggest you (once you"ll need to emulate a much bigger state machine), to use an enum which defines one flag per state...
|
|
|
|
|
... or use the "state design pattern", which can be implemented in any OO language.
|
|
|
|
|
can anybody tell abt the VB's chr() equivalent in VC++?
|
|
|
|
|
Please when asking things like that, explain what the function does. I'm not at all familiar with VB so I needed to check in the MSDN for the function. It looks like this function returns the char associated with an ASCII number, am I right ?
There is no need to call a function in C++, just cast your integer into a char and that will do the trick:
char NewChar = (char)65;
|
|
|
|
|
Thanks for ur help! i tried the same way. But as i am not sure of correctness, i placed here.Thanks once again
|
|
|
|
|
in VC++ there is no need for the conversion...
in vb
Dim MyChar As Char
MyChar = Chr(65) ' Returns "A".
in vc++
char MyChar = 65;
is enough
nave
|
|
|
|
|
Yes, but to avoid a warning because you are converting from int to char (possible loss of data), make the casting explicit:
char MyChar = (char)65;
-- modified at 4:51 Friday 21st April, 2006
|
|
|
|
|
|
Cedric Moonen wrote: char MyChar = (int)65;
you wanted to say (char) , didn't you ?
|
|
|
|
|
Yes, of course... Friday morning, end of week, brain tired, wanna go home
|
|
|
|
|
ok... so, as i'm not in the lounge, what do you do this wkend ?
|
|
|
|
|
Maybe start working on my article . You convinced me that it's time.
Otherwise, maybe going out for a little walk (I think the weather will be nice on sunday), receiving friends, spend time with my girlfriend, ... Already heavily loaded
And what about you ?
And what about VisualCalc3 ?
|
|
|
|
|
Cedric Moonen wrote: Maybe start working on my article
ahh, good news !!
what will it be about ?
Cedric Moonen wrote: And what about you ?
little wkend...
this evening, party at a coleague, so i wont sleep a lot.
saturday : sleep sleep sleep (and code, to entertain the fingers )
sunday : i referee a rugby match at about 360kms (one way only - ) from home, so, wont be there neither...
monday, let's go again for a one more run
Cedric Moonen wrote: And what about VisualCalc3 ?
sources and article done... submitting this wkend
|
|
|
|
|
v2.0 wrote: what will it be about ?
A charting control. It's been ages that I developped it, but never had the time to make an article (or, I always delayed it ).
v2.0 wrote: and code, to entertain the fingers
What about playing guitar, to entertain the fingers also
v2.0 wrote: sources and article done... submitting this wkend
Cool, I'll have a look at it
|
|
|
|
|
hi,
whr r u u guys from? i'm from india.
|
|
|
|
|
i'm from another planet than earth, but Cedric is from Belgium (looking at his CP profile...)
|
|
|
|
|
What u guys have done with my thread...
nave
|
|
|
|
|
Some relaxation is needed...
- NS -
|
|
|
|
|
u too from another planet...?
nave
|
|
|
|
|
hey, relax man, not only you have the answer to your question, but we changed the title, so you can easily see that it's not related at all with your thread...
|
|
|
|
|
Yes, France is definitively another planet with stange people
|
|
|
|
|
Cedric, who is from france ?
i really don't see who you're talking about
see my profile, and remember a little discuss some weeks ago...
|
|
|
|