D - Strange Problem with class
- Robert M. Münch (19/19) Sep 22 2002 Hi, I have the following code that will get my CPU usage to 100% and nev...
- Patrick Down (8/26) Sep 22 2002 Yes, bo_test is not initialized.
- Robert M. Münch (6/12) Sep 24 2002 Hi, :-| mea culpa. Of course this should be done. I'm programming with t...
- Burton Radons (2/17) Sep 22 2002 bo_test is pointing to null here.
Hi, I have the following code that will get my CPU usage to 100% and never terminates: import stdio; class bo_template { int name = 1; } int main () { bo_template bo_test; printf("%d\n", bo_test.name); return 0; } Any idea, what the problem is? -- Robert M. Münch IT & Management Freelancer Mobile: +49 (0)177 2452 802 Fax : +49 (0)721 8408 9112 Web : http://www.robertmuench.de
Sep 22 2002
"Robert M. Münch" <robert.muench robertmuench.de> wrote in news:amkm3c$1vdh$1 digitaldaemon.com:Hi, I have the following code that will get my CPU usage to 100% and never terminates: import stdio; class bo_template { int name = 1; } int main () { bo_template bo_test; printf("%d\n", bo_test.name); return 0; } Any idea, what the problem is?Yes, bo_test is not initialized. You need... bo_test = new bp_template(); It seems that in the Windows version of DMD a null object reference seems to go off into la la land.
Sep 22 2002
"Patrick Down" <pat codemoon.com> schrieb im Newsbeitrag news:Xns92917C401B5E1patcodemooncom 63.105.9.61...Yes, bo_test is not initialized. You need... bo_test = new bp_template();Hi, :-| mea culpa. Of course this should be done. I'm programming with to much scripting languages where you just mention objects an get them.It seems that in the Windows version of DMD a null object reference seems to go off into la la land.Yes, that's the case. It should give a runtime error because of 0-object reference usage. Robert
Sep 24 2002
Robert M. Münch wrote:Hi, I have the following code that will get my CPU usage to 100% and never terminates: import stdio; class bo_template { int name = 1; } int main () { bo_template bo_test; printf("%d\n", bo_test.name); return 0; }bo_test is pointing to null here.
Sep 22 2002