Click here to Skip to main content
15,912,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to make folder to file extension Pin
David Crow2-May-11 2:59
David Crow2-May-11 2:59 
AnswerRe: how to make folder to file extension Pin
Niklas L2-May-11 5:23
Niklas L2-May-11 5:23 
AnswerRe: how to make folder to file extension Pin
Hans Dietrich2-May-11 6:02
mentorHans Dietrich2-May-11 6:02 
Questionimplementing multi linked list correctly_? Pin
quartaela1-May-11 23:52
quartaela1-May-11 23:52 
AnswerRe: implementing multi linked list correctly_? Pin
Stefan_Lang2-May-11 0:22
Stefan_Lang2-May-11 0:22 
GeneralRe: implementing multi linked list correctly_? Pin
quartaela2-May-11 0:28
quartaela2-May-11 0:28 
GeneralRe: implementing multi linked list correctly_? Pin
Stefan_Lang2-May-11 0:44
Stefan_Lang2-May-11 0:44 
GeneralRe: implementing multi linked list correctly_? Pin
quartaela2-May-11 0:56
quartaela2-May-11 0:56 
well this is my structures;
typedef struct node {

    int count;
    int birth_date;
    int zipcode;
    int phone_num;
    char first_name[50];
    char last_name[50];
    char city[50];
    char address[50];
    char email_addr[50];

    struct node* fn_next;
    struct node* fn_pre;
    struct node* ln_next;
    struct node* ln_pre;
    struct node* birdat_next;
    struct node* birdat_pre;

} NODE;

typedef struct {

    int fn_count;
    int ln_count;

    NODE* fn_head;
    NODE* ln_head;
    
    NODE* fn_tail;
    NODE* ln_tail;

}LIST;


and i am checked with printing the nodes by ascending and descending order wtih this code;
void print_fn_list(LIST* list) {

    NODE* temp = list->fn_head;
    NODE* reverse = list->fn_tail;

	if( temp == NULL || reverse == NULL ) {

		printf("THE LIST IS EMPTY!\n");
		return;
	}

	while( temp != NULL ) {

		printf("%s  %10s\n", temp->first_name, temp->last_name);

		temp = temp->fn_next;

	}

    printf("-----------------------------------\n");

        while( reverse != NULL ) {

		printf("%s  %10s\n", reverse->first_name, reverse->last_name);

		reverse = reverse->fn_pre;

	}

    temp = list->ln_head;
    reverse = list->ln_tail;
    
    printf("-----------------------------------\n");

    if( temp == NULL || reverse == NULL ) {

		printf("THE LIST IS EMPTY!\n");
		return;
	}

	while( temp != NULL ) {

		printf("%s %10s\n", temp->last_name, temp->first_name);

		temp = temp->ln_next;

	}

    printf("-----------------------------------\n");

        while( reverse != NULL ) {

		printf("%s %10s\n", reverse->last_name, reverse->first_name);

		reverse = reverse->ln_pre;

	}
}


as you can see i use 2 headers (list->ln_head and list->fn_head). i only want know that are these 2 heads are pointing only one list, or each of them are pointing two same list but sorted in diff. ways.
GeneralRe: implementing multi linked list correctly_? Pin
Stefan_Lang2-May-11 2:44
Stefan_Lang2-May-11 2:44 
GeneralRe: implementing multi linked list correctly_? Pin
quartaela2-May-11 4:06
quartaela2-May-11 4:06 
GeneralRe: implementing multi linked list correctly_? Pin
Stefan_Lang2-May-11 4:44
Stefan_Lang2-May-11 4:44 
GeneralRe: implementing multi linked list correctly_? Pin
quartaela2-May-11 4:59
quartaela2-May-11 4:59 
GeneralRe: implementing multi linked list correctly_? Pin
Stefan_Lang2-May-11 6:20
Stefan_Lang2-May-11 6:20 
GeneralRe: implementing multi linked list correctly_? Pin
quartaela2-May-11 7:38
quartaela2-May-11 7:38 
AnswerRe: implementing multi linked list correctly_? Pin
David Crow2-May-11 9:13
David Crow2-May-11 9:13 
GeneralRe: implementing multi linked list correctly_? Pin
quartaela2-May-11 9:37
quartaela2-May-11 9:37 
QuestionHow does Google Chrome Installer gets installed with UAC Prompt Pin
Raj Aryan 10011-May-11 22:29
Raj Aryan 10011-May-11 22:29 
AnswerRe: How does Google Chrome Installer gets installed with UAC Prompt Pin
Hans Dietrich1-May-11 22:53
mentorHans Dietrich1-May-11 22:53 
GeneralRe: How does Google Chrome Installer gets installed with UAC Prompt Pin
Raj Aryan 10011-May-11 23:00
Raj Aryan 10011-May-11 23:00 
AnswerRe: How does Google Chrome Installer gets installed with UAC Prompt Pin
Hans Dietrich1-May-11 23:06
mentorHans Dietrich1-May-11 23:06 
GeneralRe: How does Google Chrome Installer gets installed with UAC Prompt Pin
Raj Aryan 10011-May-11 23:13
Raj Aryan 10011-May-11 23:13 
AnswerRe: How does Google Chrome Installer gets installed with UAC Prompt Pin
Hans Dietrich2-May-11 5:36
mentorHans Dietrich2-May-11 5:36 
GeneralRe: How does Google Chrome Installer gets installed with UAC Prompt Pin
Raj Aryan 10012-May-11 5:49
Raj Aryan 10012-May-11 5:49 
AnswerRe: How does Google Chrome Installer gets installed with UAC Prompt Pin
Hans Dietrich2-May-11 6:04
mentorHans Dietrich2-May-11 6:04 
GeneralRe: How does Google Chrome Installer gets installed with UAC Prompt Pin
Raj Aryan 10012-May-11 6:09
Raj Aryan 10012-May-11 6:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.