All pastes #496934 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-19 15:16 UTC
rendered paste body

struct linkedString {
	char *value;
	struct linkedString *next;
};

struct linkedString *fileList;

struct dirent* entry;

	
	struct linkedString *fileListPointer = fileList; 
	while ( (entry = readdir(dir)) != NULL) {
		fileListPointer = (struct linkedString*)malloc(sizeof(struct linkedString));
		fileListPointer->value = entry->d_name;
		fileListPointer = fileListPointer->next;
		fileListPointer = NULL;
		
		printf("%s\n", entry->d_name);
	}