www.digitalmars.com         C & C++   DMDScript  

D - propery problem

reply "Luna Kid" <lunakid neuropolis.org> writes:
class C
{
 int size;
}

void main(char[][] arg)
{
 C c;
 printf ("%d", c.size);
}

Compiles fine, but gives "Error: Access Violation".

Sz.
Nov 06 2003
next sibling parent reply "Nicolas Repiquet" <deadcow-remove-this free.fr> writes:
"Luna Kid" <lunakid neuropolis.org> a écrit dans le message news:
boejmc$1uil$1 digitaldaemon.com...
 class C
 {
  int size;
 }

 void main(char[][] arg)
 {
  C c;

printf( "c is a reference, not an object" ); } else {
      printf ("%d", c.size);

 }

Hope this helps =) -- Nicolas Repiquet
Nov 06 2003
parent "Luna Kid" <lunakid neuropolis.org> writes:
Hehe... Yeps, you were *very* quick... ;)

Sz.

"Nicolas Repiquet" <deadcow-remove-this free.fr> wrote in message
news:boejsr$1v2d$1 digitaldaemon.com...
 "Luna Kid" <lunakid neuropolis.org> a écrit dans le message news:
 boejmc$1uil$1 digitaldaemon.com...
 class C
 {
  int size;
 }

 void main(char[][] arg)
 {
  C c;

printf( "c is a reference, not an object" ); } else {
      printf ("%d", c.size);

 }

Hope this helps =) -- Nicolas Repiquet

Nov 06 2003
prev sibling parent reply "Luna Kid" <lunakid neuropolis.org> writes:
Hehh, sorry!... :) I was slimming down a property
example, but I seem to have gutted it a little too
aggressively... ;)

[How to cancel a message from Outlook Express? What
is the control command for the server, Jan, please?]

Cheers,
Sz.

"Luna Kid" <lunakid neuropolis.org> wrote in message
news:boejmc$1uil$1 digitaldaemon.com...
 class C
 {
  int size;
 }

 void main(char[][] arg)
 {
  C c;
  printf ("%d", c.size);
 }

 Compiles fine, but gives "Error: Access Violation".

Nov 06 2003
parent "Walter" <walter digitalmars.com> writes:
"Luna Kid" <lunakid neuropolis.org> wrote in message
news:boek1h$1v98$1 digitaldaemon.com...
 [How to cancel a message from Outlook Express? What
 is the control command for the server, Jan, please?]

Highlight the message, then click on the [Message] menu at the top. There's an option to cancel.
Feb 11 2004