delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/25/10:31:20

From: joshuahab AT aol DOT com (Joshua Hab)
Newsgroups: comp.os.msdos.djgpp
Subject: structures and structure pointers
Date: 23 Oct 1997 04:30:39 GMT
Lines: 18
Message-ID: <19971023043001.AAA27550@ladder02.news.aol.com>
NNTP-Posting-Host: ladder02.news.aol.com
Organization: AOL http://www.aol.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I have a couple of questions regarding structures and structure pointers...

First, what's the difference between a regular structure and a typedef
 structure? For example, what would be the difference between these two:

struct sprite
{
    int x, y, color;
}

typedef struct SPRITE
{
    int x, y, color;
}

Secondly, how exactly does the -> operator work? How is it different from the
 '.' operator? I've know it has something to do with structure pointers, but
 I'm still baffled, I'd really appreciate some direction. :-)  Thanks in advance.

- Raw text -


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