Hallo Community,

Ich habe mal auf dem PC ein Programm geschrieben, dass Zahlenwerte in einer Verketteten Liste speichert. Ich dachte mir, dass kann der Robby auch nur Zahlen sind witzlos, es müssen schon char-Arrays/Strings sein. Das ganze endete in einem Zeigergewirr mit Strukturgewirr verknüpft. Ich hoffe ihr habt eine Lösung für mein Problem, ich habe 'ne ganze menge Zeit rein investiert.
Code:
#include "asuro.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct knoten {
	char wort[16];
	struct knoten *next;
};

typedef struct knoten Knoten_t;
typedef struct knoten* KnotenPtr_t;
KnotenPtr_t anfang = NULL;

void einfuegenknoten( KnotenPtr_t neu ) {
	KnotenPtr_t hilfZeiger;
	if( anfang == NULL ) {
		anfang = neu;
		neu->next = NULL;
	}
	else {
		hilfZeiger = anfang;
		while(hilfZeiger->next != NULL) hilfZeiger = hilfZeiger->next;
		hilfZeiger->next = neu;
		neu->next = NULL;
	}
}

void neuerKnoten(void){
	KnotenPtr_t neu = malloc(sizeof(Knoten_t));
	if( neu == NULL){
		SerWrite("Speicher ist voll/Kein Speicher vorhanden!\n\r",45);
		return;
	}
	SerWrite("Wert für Knoten eingeben:\n\r",26);
	do { SerRead(wort[16] ,15,0);
	} while( getchar()!='\n');
}

void loescheKnoten(char txt[]){
	KnotenPtr_t hilfZeiger1;
	KnotenPtr_t hilfZeiger2;
	if(anfang != NULL){
		char tmp[] = anfang->wort
		else if( strcmp(txt[], tmp[]) == 0 ){
			hilfZeiger1 = anfang->next;
			free(anfang);
			anfang = hilfZeiger1;
		}
		else {
			hilfZeiger1 = anfang;
			while(hilfZeiger1->next != NULL){
				hilfZeiger2 = hilfZeiger1->next;
				char tmp2[] = hilfZeiger2->wort[];
				if( strcmp( txt[] , tmp2[]) == 0 ){
					hilfZeiger1->next = hilfZeiger2->next;
					break;
				}
			}
		}
	}
}

void knotenAuflisten(void){
	KnotenPtr_t hilfZeiger = anfang;
	while( hilfZeiger != NULL ){
		char out[16] = hilfZeiger->wort[16];
		SerWrite(out, 16);
		hilfZeiger = hilfZeiger->next;
	}
}

int main(void){
	while(1){
		char wahl[2] = '\0';
		char tmp[16];
		SerWrite("-a- Neues Wort hinzufügen\n\r", 28)
		SerWrite("-b- Wort löschen\n\r",19);
		SerWrite("-c- Alle Worte auflisten\n\r",27);
		SerWrite("Ihre Wahl:\n\r",13);
		SerRead(wahl, 1,0);
		if( strcmp(wahl, 'a') == 0){
			neuerKnoten();
			break;
		}
		else if(strcmp(wahl, 'b')==0){
			SerWrite("Wort zum löschen:\n\r",20);
			SerRead(tmp, 15,0);
			loescheKnoten(tmp[16]);
			break;
		}
		else if(strcmp(wahl, 'c')==0){
			knotenAuflisten();
			break;
		}
	}
	return 0;
}
Nun zur Fehlermeldung:
PHP-Code:
"C:\ASURO_src\FirstTry\Test-all.bat" 

C:\ASURO_src\FirstTry>make all 
set 
-eAVR-gcc -MM -mmcu=atmega8 -I. --Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=asuro.lst asuro.\
    | 
sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' asuro.d; \
    [ -
s asuro.] || rm -f asuro.d
      0 
[mainsh 888 sync_with_childchild 5736(0x154died before initialization with status code 0xC0000142
  45612 
[mainsh 888 sync_with_child: *** child state waiting for longjmp
/usr/bin/shforkResource temporarily unavailable
set 
-eAVR-gcc -MM -mmcu=atmega8 -I. --Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.\
    | 
sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' test.d; \
    [ -
s test.] || rm -f test.d
      0 
[mainsh 6852 sync_with_childchild 5140(0x154died before initialization with status code 0xC0000142
   6152 
[mainsh 6852 sync_with_child: *** child state waiting for longjmp
/usr/bin/shforkResource temporarily unavailable
-------- begin --------
AVR-gcc --version
AVR
-gcc (WinAVR 201001104.3.3
Copyright 
(C2008 Free Software FoundationInc.
This is free softwaresee the source for copying conditions.  There is NO
warranty
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

AVR-gcc --mmcu=atmega8 -I. --Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.-o test.o
test
.cIn function 'neuerKnoten':
test.c:32warningpointer targets in passing argument 1 of 'SerWrite' differ in signedness
test
.c:35warningpointer targets in passing argument 1 of 'SerWrite' differ in signedness
test
.c:36error'wort' undeclared (first use in this function)
test.c:36error: (Each undeclared identifier is reported only once
test
.c:36error: for each function it appears in.)
test.cIn function 'loescheKnoten':
test.c:45errorinvalid initializer
test
.c:45errorexpected ',' or ';' before 'else'
test.c:50errorexpected '}' before 'else'
test.c:44warningunused variable 'tmp'
test.c:54errorexpected expression before ']' token
test
.c:54error: array subscript is not an integer
test
.c:54errorinvalid initializer
test
.c:55errorexpected expression before ']' token
test
.c:55error: array subscript is not an integer
test
.c:55error: array subscript is not an integer
test
.cAt top level:
test.c:62errorexpected identifier or '(' before '}' token
test
.cIn function 'knotenAuflisten':
test.c:67errorinvalid initializer
test
.c:68warningpointer targets in passing argument 1 of 'SerWrite' differ in signedness
test
.cIn function 'main':
test.c:75errorinvalid initializer
test
.c:77warningpointer targets in passing argument 1 of 'SerWrite' differ in signedness
test
.c:78errorexpected ';' before 'SerWrite'
test.c:79warningpointer targets in passing argument 1 of 'SerWrite' differ in signedness
test
.c:80warningpointer targets in passing argument 1 of 'SerWrite' differ in signedness
test
.c:81warningpointer targets in passing argument 1 of 'SerRead' differ in signedness
test
.c:82warningpassing argument 2 of 'strcmp' makes pointer from integer without a cast
test
.c:86warningpassing argument 2 of 'strcmp' makes pointer from integer without a cast
test
.c:87warningpointer targets in passing argument 1 of 'SerWrite' differ in signedness
test
.c:88warningpointer targets in passing argument 1 of 'SerRead' differ in signedness
test
.c:89warningpassing argument 1 of 'loescheKnoten' makes pointer from integer without a cast
test
.c:92warningpassing argument 2 of 'strcmp' makes pointer from integer without a cast
make
: *** [test.oError 1

Process Exit Code2
Time Taken00:01 
So, jetzt seit ihr dran

LG
Spacy Bar