Christian Hackl
12/3/2008 1:44:00 PM
Hi,
First of all, you shouldn't put important information into the subject
line without repeating it in the body of your message. You claim that
"The following works in Linux", but since when is "Linux" a compiler?
Linux is an operating system, or rather a family a family of operating
systems.
parag_paul@hotmail.com ha scritto:
> #include <stdio.h>
>
> struct _table_model_entry {
> struct _table_model_entry *next;
> int line_nr;
> int nr_fields;
> char *fields[0]; /* User defined */
> };
>
>
> int main(){
> char * a,*b,*c,*d;
> struct _table_model_entry tb;
> tb.fields[0] = a;
> tb.fields[1] = b;
>
>
> }
This looks like C code. Are you sure it has anything to do with C++ at
all? Anyway, an array size of 0 is not valid C++.
If by "Linux" you actually mean "GCC", try turning it into an actual C++
compiler, e.g. by adding the -pedantic and -std=c++98 options.
--
Christian Hackl