B
beet
Hi,
I am really not good at c/c++.
Some simple code..
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "simlibdefs.h"
extern int *list_rank, *list_size;
extern int maxatr, maxlist, next_event_type;
extern double *transfer, sim_time, prob_distrib[26];
extern struct master {
double *value;
struct master *pr;
struct master *sr;
} **head, **tail;
/* Declare simlib functions. */
---
when I compile this with other files, I got the error msg like this:
simlib.h:6: error: expected init-declarator before "extern"
simlib.h:6: error: expected `,' or `;' before "extern"
I am using gcc to compile files...
Thanks a lot,
Beet
I am really not good at c/c++.
Some simple code..
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "simlibdefs.h"
extern int *list_rank, *list_size;
extern int maxatr, maxlist, next_event_type;
extern double *transfer, sim_time, prob_distrib[26];
extern struct master {
double *value;
struct master *pr;
struct master *sr;
} **head, **tail;
/* Declare simlib functions. */
---
when I compile this with other files, I got the error msg like this:
simlib.h:6: error: expected init-declarator before "extern"
simlib.h:6: error: expected `,' or `;' before "extern"
I am using gcc to compile files...
Thanks a lot,
Beet