|
VuNic wrote: int MyClass::aDavid[3]={1,2,3};
You can't do this. Since aDavid is now static , it must be initialized outside of any class member or function (i.e., file scope) just like I showed.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
David strikes again...
VuNic
|
|
|
|
|
VuNic wrote: David strikes again...
Three of these in baseball means the batter is out. Should I be careful?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
here the problem is the "batter"
VuNic
|
|
|
|
|
VuNic wrote:
here the problem is the "batter"
Please elaborate. What is it that you feel I've done wrong?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
oops i've said the opposite!!, in cricket, when you say "strike" it doesn't only mean to bowler or a batsmen, if he strikes with a bat , then its a nice "Strike"!, if the bowler takes *YET ANOTHER* wicket, then we say, the bowler *strikes again*, but in general, for a batsman, we say.. "a nice stroke".. so what i mean here..
The problem has been batting here for a while... nobody could take its wicket.. and the ultimate, awesome bolwer named david crow came in.. and took the wicket (the batsman is out) in just two balls... am i clear now?
[ in simple terms -> stikes again : shines again ]
VuNic
|
|
|
|
|
david , just a question in baseball!, when you say its a "strike", does it refer to the chuker,bowler,(how do you say??).. or the batter?..
"its a strike for the bowler"
or
"its a strike for the batsman"
??
VuNic
|
|
|
|
|
In baseball, the term "strike" refers to the pitch that was thrown (by the pitcher). If a batter swings and misses, the pitch is automatically a strike. If the batter does not swing, the pitch might still be a strike depending on where the ball fell within the strike zone (the conceptual rectangular area over home plate which defines the boundaries through which a pitch must pass in order to count as a strike when the batter does not swing). Does that help?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
ohh.. you strike again (in my terms!!), that makes sense to me. baseball too sounds interesting,.. but everytime i try to watch it i get puzzled,. now i get an idea about it .. but i still can't guess why the batter run all around the ground.. and one guy running here and another running there..anyway.. thanks for the explanation david!!
VuNic
|
|
|
|
|
VuNic wrote: but i still can't guess why the batter run all around the ground.. and one guy running here and another running there
The batter's ultimate goal is to hit the ball in such a fashion that he can run around the bases and back to home plate, thus scoring a point for his team. That's a very simplistic explanation. A batter may also have a goal of sacrificing his own attempt to score so that a runner on one of the other three bases might advance or score a point. For example, if a runner is on third base, the batter might bunt the ball towards first base knowing that he will get out but hoping that his action will result in the runner on third scoring a point. This is called a Run Batted In (RBI).
The nine players out in the field (i.e., defense) have the task of catching or fielding a batted ball. If a batted ball is caught in the air, the batter is automatically out. If the batted ball hits the ground first, the batter becomes a runner and attempts to run to as many bases as he can without getting out. He is out if he is tagged by the ball, or if the ball beats him to the next base. It gets way more complicated than this, and if you are really interested in the rules, they can be found here. Rules for other leagues (e.g., college, high school, little league) may vary slightly, but overall they are the same.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
wow.. that's so nice to hear david, but i'm tired painting you with red brush all the day so lets spare this one without a vote.
and david, the i found the *bug* in my statement that lead to the chaos!!
instead of saying : Here the "problem" is the batter, i said here the problem is the "batter"
VuNic
|
|
|
|
|
That way you are defining a twice, aren't you ? This is redefinition.
~RaGE();
|
|
|
|
|
Rage wrote:
That way you are defining a twice, aren't you ? This is redefinition.
Uh, no. Why would you think that? It's being defined and declared only once.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Rage wrote: That way you are defining a twice, aren't you ? This is redefinition.
That's how static members are initialized because they don't belong to any particular instance of a class. Hence they must be initialized before any other. Note the class name prefix before the variable name.
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#99ccff;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Defeat is temporary but surrender is permanent
--Jesus is Lord
|
|
|
|
|
hi guys
i wanted to know how should i allocate a 2D array with "new"?
i want to access it like a common array. like this: array[i][j]
|
|
|
|
|
|
<br />
long **pData = NULL;<br />
<br />
try<br />
{<br />
pData = new ( long * )[10];
<br />
for ( long iLine = 0; iLine < 10; iLine++ )<br />
{<br />
pData [iLine ] = new long [5];
}<br />
}<br />
catch(...)<br />
{<br />
}
A++
...
|
|
|
|
|
|
Sorry i put my post on the wrong message
A++
...
|
|
|
|
|
|
When ever a message is generated how do if flow in MFC ,
starting from winmain().
Eg:- if i have a Cbutton on a from View,when i press a button , how do the mesage flow in MFC structure.
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
|
|
link not operational
http://codeproject.com/cpp/mfcprogflow.asp[^]
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
One link works, while the other does not. Try it again.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|