GIDForums

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


 
 
Thread Tools Search this Thread Rating: Thread Rating: 13 votes, 4.85 average.
  #1  
Old 06-Jun-2004, 15:24
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light

[Include] Doubly-linked List


GID Forums C/C++ Forums
Code Submittal Form


Name/Brief Description:
Doubly Linked List
Date of Original Submission:
June 6, 2004
Submitted by:
dsmith
License:
None
Detailed Description:
This is a simple implementation on a doubly linked list. Both are configured to put data in sorted order. There are two versions included. The first one uses a hash pattern for the find function. This greatly increases the seek times. The second does not implement this feature. For a speed comparison, refer to the Data Structure Test in this forum.

The data type is void* for these structures so that data of any type, including complex structures. Due to this, it is necessary to do some basic type casting when placing and getting data.

Also, since these structures are sorted, a comparison routine needs to be provided by the user program. A sample comparison function for an simple integer type is:

CPP / C++ / C Code:
int compare(void* data1, void* data2)
{
	if(*( (int*) data1 ) > *( (int*) data2) )
		return 1;
	if(*( (int*) data1 ) < *( (int*) data2) )
		return -1;
	return 0;
}

In addition, for the first version of the doubly linked list another routine needs to be created. This is a range function that returns a floating point value indicating the range where a search value is compared to two other locations. A sample of this for an integer value is as follows:

CPP / C++ / C Code:
float range(void* begin, void* end, void* eval)
{
	float	value1;
	float	value2;
	
	value1 = *( (int*) eval ) - *( (int*) begin);
	value2 = *( (int*) end ) - *( (int*) begin);

	if(value2 == 0)
		return 0.0;
	else
		return (value1/value2);	
}

So, which one is better? If you have a larger data set it is worth it to create and call the range function, so use the first list (dlist.h). However, if you are dealing with smaller data sets, the need for a range function diminishes, so the simpler second list (dlist2.h) can be used.

For examples of usage on both of these lists, refer to the Data Structure Test in this forum.
Problems/Limitations:
  • Written with C++ style syntax, so it won't port to strictly C compilers
  • Need to typecast so that it is universally implemented for different types.
  • Need to create helper functions in order to use these.
As always, comments and questions are appreciated.
Attached Files
File Type: zip dlist.zip (2.5 KB, 20006 views)
File Type: zip dlist2.zip (2.0 KB, 1315 views)
  #2  
Old 26-Nov-2004, 08:50
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Doubly Linked List Explained

Introduction
I posted this doubly linked list some time ago when I was doing some comparisons of different data structures. At the time, I just posted this without a whole lot of explanation. I rather like this structure and have decided to use it in a community project that we are doing here at GIDForums™. A big part of this project is to provide good documentation for anything that is added to the project. So I have decided to backtrack and provide some documentation for this structure. If any one sees any flaws in my logic or potential problems, let me know.

Design
First of all, I will try to explain what a doubly linked list is and why it is used.

A linked list is a storage structure that is kind of a like an array in that it is a structured storage of similar items. Unlike an array though, a linked list is a dynamic storage structure as opposed to a static storage structure. This makes growing the list much easier.

Here are some graphics that may help to visualize the advantages of a linked list over an array. First here is a graphical representation of an array.

The top image shows a basic array setup. An array consists of a contiguous segment of memory that can be quickly and simply indexed by the user to get the nth element. It can be resized by calls to realloc to grow and shrink as necessary.

The bottom image shows the problem with arrays. When you do a sorted insert on an array, you will need to move data around in order to do it. This makes inserting data extremely slow. The same thing happens when data is deleted.

Now here is a graphical representation of a doubly linked list.

The top image shows the basic setup of a doubly linked list. A doubly linked list consists of individually allocated nodes that are non-contiguous. These elements are linked together by pointers to the next or previous element. A singly linked list will only go in one direction (next), while a doubly linked list will go forwards or backwards through the data. Indexing is slower, because you have to navigate through each link to get to the destination.

The bottom image shows why linked lists are used. To do an insert in a linked list, you simply snip the connectors between where the new data is to go and reconnect them to the new node. There is no need to move any data.

So what are the advantages/disadvantages of a linked list.
Linked List Advantages
  • Inserting data into a linked list is much faster.
  • Deleting data from a linked list is much faster.
  • No memory reallocation calls are needed.
  • No need for a large contiguous memory block.

Linked List Disadvantages
  • Much more intensive to setup.
  • Indexing and parsing is slower.

That should give a generic overview of a doubly linked list. Now for the specifics of the dlist implementation.
  • I have decided to use a c++ implementation. This is because of the ease of using a single class to contain all the data and functions and the ability to absolutely hide the data to the end user.
  • I choose to store a generic address that points to data instead of any type of data itself. This allows for this list to store any type of data, including different data types in the same list.
  • This particular implementation uses a simple algorithm to guess where the data needs to be inserted and then starts the normal search from there. In testing, I have found that this does speed things up.

Function Documentation
This is a documentation list of all of the public functions available to the end user (application progammer) in this implementation of a doubly linked list. All data is private and is not accessible to the user.

First of all, here is a quick, complete list of all the public functions. Each function is described in detail below.
CPP / C++ / C Code:
//************************************
//*** CONSTRUCT/DESTRUCT FUNCTIONS ***
//************************************
dlist(int type = 0, int search_range = 200);
~dlist();
	
	
//**************************
//*** MOVEMENT FUNCTIONS ***
//**************************
int	next();
int	prev();
int	home();
int	end();
void goto_index(long where);
	
	
//**********************
//*** DATA FUNCTIONS ***
//**********************
void add_data(void* new_data);
void add_atpos(void* new_data);
void add_sort(void* new_data, int (*compare)(void*,void*), float (*range)(void*,void*,void*));
void* get_data();
void* get_atpos(long where);
void rem_data()};
	 
	
//************************
//*** SEARCH FUNCTIONS ***
//************************
int close_search(void* search_data, int (*compare)(void*,void*));
int find_data(void* search_data, int (*compare)(void*,void*),float (*range)(void*,void*,void*));
	
	
//***********************
//*** QUERY FUNCTIONS ***
//***********************
int is_empty();
int	is_home(); 	
int is_end();
long cur_index();
long get_size();
	
	
//***********************************
//*** MARKING/DEMARKING FUNCTIONS ***
//***********************************
void* set_mark();
void goto_mark(void* mark)};
void reindex();

Detailed Function List
  • CPP / C++ / C Code:
    dlist(int type = 0, int search_range = 200);
    This is the constructor. This must be called prior to using the linked list. It configures all initial settings and sets the head and tail.
    It takes two parameters which both have defaults if not given.
    • type
      This indicates whether the list is to contain only unique items. A type 1 is only unique items, a type 0 accepts duplicate items. The default is non-unique(0).
    • search_range
      The search_range indicates at what size, the hash function will start being used. Through testing, I have found that it is best to only call the hash function a single time in any case. For smaller lists, it should not be used.
  • CPP / C++ / C Code:
    ~dlist()
    The destructor. This deletes the list. This also removes any left over list links. It does NOT delete the data that these addresses points to as it doesn't know anything about the data that is there. It is recommended that the user program has a function that will parse through the list and delete the data that is pointed to, prior to calling the destructor.
  • CPP / C++ / C Code:
    int next()
    Navigation command. Positions the current pointer at the next position. Returns 1 upon success and 0 if current can not go to next because it is at the end of the list.
  • CPP / C++ / C Code:
    int prev()
    Navigation command. Positions the current pointer at the previous position. Returns 1 upon success and 0 if current can not go to previous because it is at the head of the list.
  • CPP / C++ / C Code:
    int home()
    Navigation command. Positions the current pointer at the head of the list. Returns 1 upon success and 0 if the list is empty.
  • CPP / C++ / C Code:
    int end()
    Navigation command. Positions the current pointer at the end of the list. Returns 1 upon success and 0 if the list is empty.
  • CPP / C++ / C Code:
    void goto_index(long where)
    Navigation command. The dlist implementation keeps an internal numerical index of its position. The data itself is not indexed. This function will attempt to go to the index passed in where. It does not return anything. It indexes as far as possible until it finds the index or hits the beginning or ending of the list.
    This function is provided for convenience and not speed. It is not as fast as the name may indicate. It is a very expensive (in terms of processing) as it does several compares.
  • CPP / C++ / C Code:
    void add_data(void* new_data)
    Data command. This function adds data to the end of the list in an unsorted manner. Generally, this command is not called by the end user. If you are using the dlist implementation, it is probably because you have sorted data. The one exception is if you are storing items that are known to be in order, such as a file read. In this case, this is an extremely fast function (can't be beat!).
  • CPP / C++ / C Code:
    void add_atpos(void* new_data
    Data command. This adds data at the current position or rather in between current and its previous link. Again, calling this function directly doesn't make a whole lot of sense. It is used internally by add_sort, but I can't think of any reason that the end user would want to call this function. But it is public if you want it.
  • CPP / C++ / C Code:
    int add_sort(void* new_data, int (*compare)(void*,void*), float (*range)(void*,void*,void*))
    Data command. This is the add command that the end user will generally use. It adds the data according to the sort function and hash function passed (and created) by the user program. 0 is returned upon sucess and -1 is returned if the user program is trying to put an identical data item in a unique list.
    • void* new_data
      This is address of the data to be added, NOT the data itself. dlist does not care what kind of data you use, only where you stick it. This is not as complicated as it may seem. It does require some typecasting (void*) and the user program is responsible for all memory allocation.
    • int (*compare)(void*,void*)
      This is where it gets a little more complicated. dlist has no idea how to sort your data. The user program must provide the compare routine. The structure of this routine is explained below.
    • float (*range)(void*,void*,void*)
      This is where it gets really confusing! In larger sorted lists, I have found that data can be inserted quicker by the limited use of a simple hash that tries to predict where to start the real search. If your data structure is not large or need this level of optimization, I have provided dlist2 which does not use this optimization. As can be seen here this can speed things up. The hash optimized dlist took almost half the time to complete my data structure test as the standard list. Again this function is described below.
  • CPP / C++ / C Code:
    void* get_data()
    Data command. This command returns the address of the current position. Again this is going to require some type casting (my_data = (my_data_type*)my_list->get_data()).
    This will return NULL(0) if the list is empty).
  • CPP / C++ / C Code:
    void* get_atpos(long where)
    Data command. This is simply two functions in 1. It calls the navigation function: goto_index() and then calls the get_data() command. It does reposition the current pointer. This will return NULL(0) if the list is empty).
  • CPP / C++ / C Code:
    void rem_data()
    Data command. This removes the link from the list and frees any internal memory. In other words, it does not delete the user data (nor can it). The user needs to take care of deleting any allocated memory for the data itself.
  • CPP / C++ / C Code:
    int close_search(void* search_data, int (*compare)(void*,void*))
    Search command. This is the first of two search routines and generally does not need to be called by the user program, unless you specifically don't want to use the hash function. Both of these functions position the current pointer to the data that is equal to or as close as possible to the search_data. In addtion, these functions returns a 0 if the data is empty or if the search_data is greater than the last item. They return 1 if there is an exact match and a -1 on an in-between match.
  • CPP / C++ / C Code:
    int find_data(void* search_data, int (*compare)(void*,void*),float (*range)(void*,void*,void*))
    Search command. This is the search command that the user program will generally want to call. It implements the hash and then calls close_search for the finite searching. Since it calls close_search to finalize the search, the return values and functionality are identical.
  • CPP / C++ / C Code:
    int is_empty()
    Query commmand. This function returms 1 if the list is empty and 0 if not.
  • CPP / C++ / C Code:
    int is_home()
    Query command. This function returns 1 if the current pointer is at the top of the list and 0 if not.
  • CPP / C++ / C Code:
    int is_end()
    Query command. This function returns 1 if the current pointer is at the end of the list and 0 if not.
  • CPP / C++ / C Code:
    long cur_index()
    Query command. This returns the index (counter) of the current pointer. This is internally tracked by the movement of the navigation commands and is not tied to the data. This is also 1-based. (not 0).
  • CPP / C++ / C Code:
    long get_size()
    Query command. The number of elements are tracked as they are added or deleted. This function returns this number.
  • CPP / C++ / C Code:
    void* set_mark()
    Marking command. This returns the address of the current pointer to be quickly reset with a call to goto_mark. The use of these functions allows instantaneous movement between user-set points in the structure.
  • CPP / C++ / C Code:
    void goto_mark(void* mark)
    Marking command. This function is used in conjunction with set_mark to return to a user-set point in the list.
  • CPP / C++ / C Code:
    void reindex()
    Marking command. At first look, this function may seem very strange. This function is necessary to reposition the index (counter) after a call to goto_mark. This function should never need to be called by the user program. This function is also an unfortunate hit in speed, but it is necessary for the index feature.

Necessary user Functions
The intent of dlist is to be as quick and easy as possible. There are no external libraries, it has a limited set of commands and still has some unique features. However, the most difficult part is setting up the sort functions. In order to use dlist, it is absolutely necessary for the user program to define and implement these functions. They can be named anything, but they must have the parameters as shown and must have the return values as shown.

Included in the dlist file is some commented out examples of these routines using a int type data. These are explained below.
  • compare
    This function is identical in function to the standard strcmp function. It should return a 0 if the items are the same, a 1 if the first data is greater than the second data and -1 if the first data is less than the second data. Here is a sample using int:
    CPP / C++ / C Code:
    int compare(void* data1, void* data2)
    {
    	if(*( (int*) data1 ) > *( (int*) data2) )
    		return 1;
    	if(*( (int*) data1 ) < *( (int*) data2) )
    		return -1;
    	return 0;
    }   
    
    This may seem kind of strange with an int value, but remember this can be used with your own data structures which may have much more complex sorting criteria.
  • range
    This function again is more complicated. It is designed to be used initially in searches to get close before the more intensive search is conducted. The purpose of this function is to guess where the search_data may fall between these two points. It basically returns a number between 0 and 1, where 0 indicates that the search value is at the first point and 1 indicates that the search value is at the second point. Any number between indicates a percentage of how far the search value is between points. This is a pretty simple equation:
    Code:
    range = ( search - first ) / ( last - first )

    This obviously works best for evenly distrubuted data. But remember, the intent is to get close (within about 200), not exact. Here is a sample using an integer type:
    CPP / C++ / C Code:
    float range(void* begin, void* end, void* eval)
    {
    	float	value1;
    	float	value2;
    
    	value1 = *( (int*) eval ) - *( (int*) begin);
    	value2 = *( (int*) end ) - *( (int*) begin);
    
    	if(value2 == 0)
    		return 0.0; 
    	else 
    		return (value1/value2);
    } 
    
Sample Usage
Now for a sample. This is a bit longer, but I wanted something that at least had a pretense of being useful. In this sample, you can enter a list of strings into the list. You need to pass a file upon execution, in which these strings will be stored and retrieved. I set the hash value low and put in some language when it was called.
CPP / C++ / C Code:
#include <stdio.h>
#include <string.h>
#include "dlist.h"

//Compare function to pass to dlist add_sort
int compare(void* data1, void* data2)
{
	return(strcmp( (char*)data1, (char*) data2) );			// Too easy :)
}  

//range function to pass to dlist add_sort
//For a full string we will only compare the first letter.
float range(void* begin, void* end, void* eval)
{
	float	value1;
	float	value2;

	value1 = *( (char*) eval ) - *( (char*) begin);
	value2 = *( (char*) end ) - *( (char*) begin);

	printf("hash: value1 = %2.2f, value2 = %2.2f\n",value1,value2);
	if(value2 == 0)
		return 0.0; 
	else 
		return (value1/value2);
}  

//Function to allocate exact memory & remove return
char* reduce(char *from)
{
	char*	string = (char*) malloc(strlen(from));
	
	strcpy(string,from);
	if(*(string+strlen(string)-1) == '\n')
		*(string+strlen(string)-1) = 0;
	return(string);
}

//Reads a file and loads it in a list
void read_list(FILE* fp, dlist* stlist)
{
	char 	string[100];
	char*	new_string;
	
	while(fgets(string,100,fp)){
		new_string = reduce(string);			
		stlist->add_data((void*) new_string);	//DLIST: Add at end of list
	}
}

//Outputs strings to file (or screen)
void output(FILE* fp, dlist* stlist)
{
	if(stlist->home()){							//DLIST: Go to top of list
		do{
			fprintf(fp,"%s\n",(char*)stlist->get_data());	//DLIST: Get data
		}while(stlist->next());					//DLIST: Go to next item
	}
}	

void remove_data(dlist* stlist)
{
	if(stlist->home()){							//DLIST: Go to top of list
		do{
			free((char*)stlist->get_data());	//DLIST: Get data
		}while(stlist->next());					//DLIST: Go to next item
	}		
}	

int main(int argc, char* argv[])
{
	dlist*	stlist;
	FILE*	fp;
	char string[100];
	
	if(argc!=2)
		printf("You must include a file to load and save the list\n");
	else{
		stlist = new dlist(0,10);						//DLIST: Call constructor
		if(fp = fopen(argv[1],"r") ){
			read_list(fp,stlist);
			fclose(fp);
		}
		string[0] = 0;
		printf("Enter your strings.  Enter done when finished.\n");
		while(strcmp(reduce(string),"done")){
			printf("String: ");
			fgets(string,100,stdin);
			if(strcmp(reduce(string),"done"))
				stlist->add_sort((void*)reduce(string),compare,range);	//DLIST: Add sorted
		}
		output(stdout,stlist);
		if(fp = fopen(argv[1],"w") ){
			output(fp,stlist);
			fclose(fp);
		}
		else
			printf("Could not open output file!\n");
	
		remove_data(stlist);	
		delete stlist;
	}	
	return 0;
} 


This program includes about 10 lines that are calls to the dlist functions, about 20 lines that are the implementation of the range and compare functions. The rest is code for input, file processing, etc.

Other, more complete, examples can be found at the data comparison contest. In addition, this is the data storage structure that I am going to use initially for the contact list in GIM.

Conclusion
There you have it. Hopefully that clarifies doubly linked lists for anyone. I wrote this from a perspective of not only explaining what a doubly linked list is, but also what makes this implementation different than others. As always comments are welcome.

Also, there is a slight change that I have done to the list. It is rather important and I would recommend that you download this version rather than the one above.
Attached Files
File Type: zip dlist.zip (2.7 KB, 463 views)
  #3  
Old 19-Jan-2005, 09:43
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Another small but fairly important update. In working with the dlist in another project (gim), I found a small problem with the locate routine. It was looking for -1 and 1 exactly for return values from the compare routine. For a custom written compare this can be implemented, but if you want to use the exact return values from strcmp this is a problem. strcmp returns a positive number or a negative number which is rarely 1 or -1 because it returns the ASCII difference between the first non-matching charecters.

I have attached an updated version of this program to fix this little problem.
Attached Files
File Type: zip dlist.zip (2.7 KB, 266 views)
  #4  
Old 11-Mar-2006, 08:44
moorish moorish is offline
New Member
 
Join Date: Mar 2006
Posts: 3
moorish is on a distinguished road

Re: [Include] Doubly-linked List


HI smith..

I have just gone through the coding of doubly linked list.. i have develop some coding and don't know to make them work... can u please help me.

thanks
  #5  
Old 14-Apr-2006, 09:45
realnapster realnapster is offline
Junior Member
 
Join Date: Feb 2006
Posts: 51
realnapster will become famous soon enough

Re: [Include] Doubly-linked List


hey moorish

I can't understand what do you mean by "make them work" ? Does it mean that you was unable to understand the main objective of double linked list or the code is not working ?

Please explain yourself and your problem as well.
__________________
*Labor omnia consent*** Hardwork conquers all*
  #6  
Old 14-Apr-2006, 10:05
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light

Re: [Include] Doubly-linked List


Sorry - didn't see this until real posted.

Like he said if you can go into a bit more detail, we can try to help you out a bit.

Thanks.
  #7  
Old 14-Apr-2006, 13:12
davis
 
Posts: n/a

Re: [Include] Doubly-linked List


Quote:
Originally Posted by dsmith
Another small but fairly important update. In working with the dlist in another project (gim), I found a small problem with the locate routine. It was looking for -1 and 1 exactly for return values from the compare routine. For a custom written compare this can be implemented, but if you want to use the exact return values from strcmp this is a problem. strcmp returns a positive number or a negative number which is rarely 1 or -1 because it returns the ASCII difference between the first non-matching charecters.

I have attached an updated version of this program to fix this little problem.

Help me understand why, if using C++, someone would want to use dlist versus std::list, std::vector or std::deque?

Isn't an appropriate implementation of a doubly linked list is going to have some notion of how to initialize (allocate) nodes and how to deinitialize (deallocate) them. This one seems to push that responsibility out to the user. Wouldn't you rather use a better idiom?

I don't mean to be rude, but what user category do you envision for this code?

Do you consider dlist to be extensible?

Why is "size" a signed value and not unsigned?

Why is there a is_empty() operation that evaluates the status of the head pointer? Wouldn't checking "size" be more appropriate? Why even use the function call inside your implementation, couldn't you just as easily use:

if( !size ) { ... }

...and save the overhead of the function call? Doesn't is_empty just tell us whether head is a null pointer or not? Why not use if( !head )?

You are using function pointers in your search functions and sorting function, why not use them in your allocation/deallocation?

Is there some reason that you're returning int for is_xxxx? and not bool?

Do you think that "rem_data" should be a public member? Is the user expected to ever use it, or is it intended that the destructor will?

Do you think that "goto_index" should be a public member? How will a user "know" where "where" is/should be? If we already have a valid "where," why not just go directly to it instead of calling next() or prev() who knows how many times?

Don't you think that there should probably be a test to see if "where" is beyond "tail" or before "head" before next-ing or prev-ing? Considering that goto_index is public, couldn't a user pass in a "where" value that doesn't exist in the dlist such that it where will never equal the work product of next/prev?

Do you feel that it is probably better to use a different name than "next" to advance? ...or a differently named data.next member?

data.info is the data, but data is the node in the list. Is there some reason why you didn't use node as the node and node.data as the data?

Considering that the license is GPL, doesn't that make any code that uses it GPL by requirement?

If GPL'ing the source, why not GPL it per FSF's recommendations?

Code:
g++ -g -Wall -I. -o dlist dlist.cpp In file included from dlist.cpp:1: ./dlist.h:2:1: warning: "/*" within comment ./dlist.h:3:1: warning: "/*" within comment ./dlist.h:4:1: warning: "/*" within comment ./dlist.h:5:1: warning: "/*" within comment ./dlist.h:6:1: warning: "/*" within comment ./dlist.h:7:1: warning: "/*" within comment ./dlist.h:8:1: warning: "/*" within comment ./dlist.h:9:1: warning: "/*" within comment ./dlist.h:10:1: warning: "/*" within comment ./dlist.h:11:1: warning: "/*" within comment ./dlist.h:12:1: warning: "/*" within comment ./dlist.h:13:1: warning: "/*" within comment ./dlist.h:14:1: warning: "/*" within comment ./dlist.h:15:1: warning: "/*" within comment ./dlist.h:16:1: warning: "/*" within comment ./dlist.h:17:1: warning: "/*" within comment ./dlist.h:18:1: warning: "/*" within comment ./dlist.h:19:1: warning: "/*" within comment ./dlist.h:20:1: warning: "/*" within comment ./dlist.h:21:1: warning: "/*" within comment ./dlist.h:22:1: warning: "/*" within comment ./dlist.h:23:1: warning: "/*" within comment ./dlist.h:24:1: warning: "/*" within comment ./dlist.h:25:1: warning: "/*" within comment ./dlist.h:26:1: warning: "/*" within comment ./dlist.h:27:1: warning: "/*" within comment ./dlist.h:28:1: warning: "/*" within comment ./dlist.h:29:1: warning: "/*" within comment ./dlist.h:30:1: warning: "/*" within comment ./dlist.h:31:1: warning: "/*" within comment ./dlist.h:32:1: warning: "/*" within comment ./dlist.h:33:1: warning: "/*" within comment ./dlist.h:34:1: warning: "/*" within comment ./dlist.h:35:1: warning: "/*" within comment ./dlist.h:36:1: warning: "/*" within comment ./dlist.h:37:1: warning: "/*" within comment ./dlist.h:38:1: warning: "/*" within comment ./dlist.h:39:1: warning: "/*" within comment ./dlist.h:40:1: warning: "/*" within comment ./dlist.h:41:1: warning: "/*" within comment ./dlist.h:42:1: warning: "/*" within comment ./dlist.h:43:1: warning: "/*" within comment ./dlist.h:44:1: warning: "/*" within comment ./dlist.h:45:1: warning: "/*" within comment ./dlist.h:46:1: warning: "/*" within comment ./dlist.h:47:1: warning: "/*" within comment ./dlist.h:48:1: warning: "/*" within comment ./dlist.h:49:1: warning: "/*" within comment ./dlist.h:50:1: warning: "/*" within comment

I guess that the compiler doesn't like your comment block style very well...

:davis:
 

Recent GIDBlogUpdates On The All New Toyota VIOS - Part III by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge sort on a linked list Temujin_12 CPP / C++ Forum 1 06-Mar-2008 20:33
[CONTEST?]Data Structure Test dsmith C Programming Language 2 06-Jun-2004 15:13
testing word file "need help" alexandro C Programming Language 2 03-Jun-2004 14:38
help on linked lists any1????? nick4 C Programming Language 1 17-May-2004 09:32
[include] list1.h -- Linked list class dsmith C Programming Language 2 04-May-2004 09:42

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:00.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.