z88dk forums

z80 Development Kit

You are not logged in.

#1 2010-05-24 01:58:32

BastetFurry
New member
Registered: 2010-05-24
Posts: 1

[Z88dk-users] struct array containing an char array

Hello List! smile

I am trying to use z88dk for an SD reader.

Version:
zcc - Frontend for the z88dk Cross-C Compiler
v2.58 (C) 22.6.2009 D.J.Morris

Getting straight to the core, this looks like legit C code to me:

Code:

void main()
{
struct filestruct
{
char name[13],
int size
} files[100];
//rest of code be here

But the compiler trows:
sccz80:"bios.c" L:78 Warning:#17:Expected ';'
sccz80:"bios.c" L:78 Error:#45:Missing token, expecting } got s
sccz80:"bios.c" L:79 Warning:#17:Expected ';'
sccz80:"bios.c" L:79 Error:#27:Missing Open Parenthesis

Any ideas?

greetings,
Markus



------------------------------------------------------------------------------

Offline

 

#2 2010-05-24 09:05:55

Bodo Wenzel
Guest

Re: [Z88dk-users] struct array containing an char array

struct filestruct
{
char name[13],
int size
} files[100];

For me there should be a semicolon ';' instead of the ',' comma after
"name[]".

Bodo


------------------------------------------------------------------------------

 

#3 2010-05-24 13:33:46

dom
Administrator
Registered: 2007-07-15
Posts: 745
Website

Re: [Z88dk-users] struct array containing an char array

struct filestruct
{
char name[13],
int size
} files[100];

For me there should be a semicolon ';' instead of the ',' comma after
"name[]".

Thanks Bodo, and whilst we're there, lets stick a semicolon afer size as well. smile



------------------------------------------------------------------------------

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson