473,320 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Parsing error!?

Ok, i have this problem that is driving me nuts!

I have a header file that has the function definition:
landindp get_world_landind( worldp world );
where landindp and worldp are pointers to structs.
I keep getting errors saying "parse error before get_world_landind()"
and "warning: data definition has no type or storage class"

Now i have the landind.h file included, and landindp is defined as:
typedef struct landind *landindp;

and in landind.c
struct landind
{
//insert code here
} landind_;

Any ideas why i would be getting this error? It seems to me that the
struct is not being seen, but why?
Nov 13 '05 #1
4 1820

"ArmedCoder" <dc****@cox.net> wrote in message
news:6f************************@posting.google.com ...
Ok, i have this problem that is driving me nuts!

I have a header file that has the function definition:
landindp get_world_landind( worldp world );
where landindp and worldp are pointers to structs.
I keep getting errors saying "parse error before get_world_landind()"
and "warning: data definition has no type or storage class"

Now i have the landind.h file included, and landindp is defined as:
typedef struct landind *landindp;

and in landind.c
struct landind
{
//insert code here
} landind_;

Any ideas why i would be getting this error? It seems to me that the
struct is not being seen, but why?


Put together a small complete example program that
demonstrates this error. Also show the contents
of the #included header. Don't type it in, copy
and paste it into your message.

-Mike
Nov 13 '05 #2
dc****@cox.net (ArmedCoder) writes:
I have a header file that has the function definition:
landindp get_world_landind( worldp world );
where landindp and worldp are pointers to structs.
I keep getting errors saying "parse error before get_world_landind()"
and "warning: data definition has no type or storage class"


Make sure that the declaration before that one is properly
terminated with ; or }. If that doesn't help, try running the
file through a C preprocessor to see if a macro is expanding
unexpectedly somewhere.

Is worldp properly declared?
Nov 13 '05 #3
ArmedCoder wrote:
I keep getting errors saying "parse error before get_world_landind()"
and "warning: data definition has no type or storage class"


I get similar errors when forgetting to close brackets.
You should try going through the code before the error and see if you
forgot any.

--
Ian Tuomi
Jyväskylä, Finland

"Very funny scotty, now beam down my clothes."

GCS d- s+: a--- C++>$ L+>+++$ E- W+ N+ !o>+ w---
!O- !M- t+ !5 !X R+ tv- b++ DI+ !D G e->+++ h!

NOTE: Remove NOSPAM from address

Nov 13 '05 #4
Groovy hepcat ArmedCoder was jivin' on 2 Oct 2003 22:08:15 -0700 in
comp.lang.c.
Parsing error!?'s a cool scene! Dig it!
I have a header file that has the function definition:
landindp get_world_landind( worldp world );
where landindp and worldp are pointers to structs.
I keep getting errors saying "parse error before get_world_landind()"
and "warning: data definition has no type or storage class"

Now i have the landind.h file included, and landindp is defined as:
typedef struct landind *landindp;

and in landind.c
struct landind
{
//insert code here
} landind_;

Any ideas why i would be getting this error? It seems to me that the
struct is not being seen, but why?


Others have given some suggestions, but this may help if they don't.
I've seen weird things like this if the last line of an included
header is not properly newline-terminated. Make sure each header ends
in a newline.

--

Dig the even newer still, yet more improved, sig!

http://alphalink.com.au/~phaywood/
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technically correct" English; but since when was rock & roll "technically correct"?
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
2
by: Cigdem | last post by:
Hello, I am trying to parse the XML files that the user selects(XML files are on anoher OS400 system called "wkdis3"). But i am permenantly getting that error: Directory0: \\wkdis3\ROOT\home...
16
by: Terry | last post by:
Hi, This is a newbie's question. I want to preload 4 images and only when all 4 images has been loaded into browser's cache, I want to start a slideshow() function. If images are not completed...
3
by: David Svoboda | last post by:
I have a server program that takes commands and acts on them. The server program can also take these commands from an input file or standard input (mainly for testing purposes). As such, I often...
0
by: palabat | last post by:
Hello. I'm getting this error , "XML error parsing SOAP payload : Empty Document" when I try to execute a NuSOAP client in consuming a .NET web service. The response from the web service server...
13
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
0
by: =?Utf-8?B?VWxmIFRob3JzZW4=?= | last post by:
I use Visual Studio 2005 for a C-project using an external compiler, and came up with the idea that error parsing would be neat, i.e. enabling the functionality available for a "normal" build...
3
by: GazK | last post by:
I have been using an xml parsing script to parse a number of rss feeds and return relevant results to a database. The script has worked well for a couple of years, despite having very crude...
2
by: Felipe De Bene | last post by:
I'm having problems parsing an HTML file with the following syntax : <TABLE cellspacing=0 cellpadding=0 ALIGN=CENTER BORDER=1 width='100%'> <TH BGCOLOR='#c0c0c0' Width='3%'>User ID</TH> <TH...
1
by: hd95 | last post by:
In a perfect world my xml feed source would produce perfect xml ..that is not the case I am parsing an XML feed that sometimes has ampersands and dashes in the content that messes up my parsing. ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.