www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/10/13:32:23

From: Matthew Heyman <kay DOT heyman AT airmail DOT net>
Newsgroups: comp.os.msdos.djgpp,comp.os.programmer,comp.graphics.algorithms
Subject: struct problem
Date: Mon, 09 Aug 1999 17:32:37 +0000
Organization: Airnews.net! at Internet America
Lines: 28
Message-ID: <A7083B60FEDED7E0.7F2CBC07CD9B5AB8.019CE2E485CE12C4@lp.airnews.net>
X-Orig-Message-ID: <37AF10B5 DOT 46D7 AT airmail DOT net>
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library1.airnews.net
NNTP-Posting-Time: Mon Aug 9 17:33:01 1999
NNTP-Posting-Host: !Z`^81k-XEh/HSW (Encoded at Airnews!)
Mime-Version: 1.0
X-Mailer: Mozilla 3.01C-KIT (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

All right....   I have a struct declared like this in a header file.

typedef struct
{
int x; // x
int y; // y
int z; // z
} vert_3d;

Within the main .cpp file I have this declaration as a global. 

vert_3d p000;
p000.x = 0;
p000.y = 10;
p000.z = 20;

After compiling the program I get an error that says there is a syntax
error in this line and every one after. 

p000.x = 0;  //syntax error before '.'  

This error happens on every single declaration of the program in every
single struct I use.  The program gives no problems with the struct
declarations, only on the variable assignments themselves.  

Thanks for any help.  

Matthew Heyman

- Raw text -


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