delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/21/01:22:16

From: twidler444 AT aol DOT com (Twidler444)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ? strange problem
Lines: 36
NNTP-Posting-Host: ladder01.news.aol.com
X-Admin: news AT aol DOT com
Date: 21 Dec 1998 06:18:35 GMT
Organization: AOL Canada http://www.aol.ca
References: <367DC3DE DOT D0C4EF8E AT ulster DOT net>
Message-ID: <19981221011835.10649.00002187@ng42.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello
   I couldn't find the earlier posting, But I think I know what you are talking
about, and how to fix it.

does your code look something like this?

typedef struct TEST
{
int x,y;
}TEST;

TEST it;

int main()
{
TEST temp;

temp=it;
temp.x=10;
temp.y=50;

// then here is were you find out that it.x isnt 10
}

I found that in DJGPP(and other free compilers) that you can only read from
temp.x and not write.  to write to it you have to do this:

it.x=10;
it.y=50;

I havent found a way to sent the pointer to a procedure (as argument) and then
write to it there....yet.

hope this helped a bit..

Twidler

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019