By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,709 Members | 2,155 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,709 IT Pros & Developers. It's quick & easy.

syntax error in code plz help

P: 9
Hi everyone, I have a couple of questions?
1.this is part of my main function
//////////////////////////////
int main()
{
FILE *f1;

int i,j;
j=100000000;
int intData[1000];
f1=fopen("out3.txt","wt");

/* Generating 1000 integers from 100,000,001 to 100,001,000 */
for (i =0; i <1000; i++)
{
intData[i] = ++j;
}
/////////////////////////////
when i try to compile it i get syntax error before j as well as f1?
Can anyone provide clues on why is that happening?

2.//////////////////////////
struct t_node
{
void *item;
struct t_node *left;
struct t_node *right;
} node;
//////////////////////////
i get an warning : structure defined inside inside parms on compiling
//////////////////////////////
struct t_collection
{
/* Note that size is not needed any longer! */
int (*ItemCmp)( void *, void * );
struct t_node *node;
};
////////////////////////////////////////
even this one gives 2 warning saying that
warning : structure defined inside parms
warning: empty declarations

Any help is appreciated. Thanks in advance.
Mar 20 '07 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
This question is being moved to the miscellaneous discussions forum as you don't specify which language you are using.

ADMIN
Mar 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.