"Little" <cookiecandyred@yahoo.com> writes:[color=blue]
> Could someone tell me what I am doing wrong here about declaring
> mutiple double linked lists. This is what the information is for the
> project and the code wil be below that. Thank your soo much for your
> assitance in helping me solve this problem.[/color]
What problem? You show us a problem description and a bunch of code.
What exactly are you asking?
[color=blue]
> Information:
>[/color]
[problem description snipped]
Let me guess, this is homework, right? (Asking for help on homework
is ok if you've made some effort yourself, but it's polite to mention
it.)
[color=blue]
> The start of the code:[/color]
This is very similar to something you posted two days ago. I posted a
rather lengthy followup; did you read it?
[color=blue]
> #include <stdio.h>
> #include <stdlib.h>
> #include "scan.h"[/color]
Last time, you posted the contents of "scan.h". This time, you
didn't. (I think there was a "scan.c" file as well.) Without knowing
what's in that header file, we can't guess what your problem might be.
[color=blue]
> struct Names
> {
> char* TYPE;
> int length;
> char data[256];
> struct Names* next;
> struct Names* prev;
> };
>
> typdef struct Names DLList;
> typdef struct Names header;[/color]
You have two different typedefs for the same struct type; this is
bound to cause confusion. As I mentioned previously you don't need
any typedefs at all. Just refer to "struct Names" directly. The
typedefs are legal, and some people do like them. It's mostly a style
issue. But you shouldn't have multiple names for the same thing
unless you have a specific reason to do so.
[color=blue]
> struct Numbers
> {
> char* TYPE;
> int length;
> char data[256];
> struct Names* next;
> struct Names* prev;
> };
>
> typdef struct Numbers DLList;
> typdef struct Numbers header;[/color]
Again, you have two typedefs for the same struct type -- *and* one
of them has the same name as the previous one, which is illegal.
Furthermore, you've misspelled "typedef", which is a syntax error.
You obviously haven't compiled this code. If you had, you would
already have corrected some of the more obvious errors. If you can't
be bothered to take the time to do this before dumping your incomplete
code here, there's not much we can do to help you. Conceivably we
could *guess* what you're trying to do, but that would be a waste of
our time. Post some real code that we can try compiling ourselves
*and* tell us what problems you're having, and maybe we can help. If
you want to show us compiler messages or program output,
copy-and-paste that as well; don't try to summarize.
(Usually when we see code with typos, it's because the poster tried to
summarize or re-type the code rather than copy-and-paste it. This is
long enough that I doubt that's what happened.)
[big snip]
--
Keith Thompson (The_Other_Keith)
kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.