working on insert list
This commit is contained in:
		
							parent
							
								
									f8cc4c0a2b
								
							
						
					
					
						commit
						dad33e0587
					
				|  | @ -86,7 +86,9 @@ void TEMPLATE(add,LIST_NODE)(LIST_TYPE data, LIST_NODE* list){ | ||||||
| Insert List; | Insert List; | ||||||
| 	Inserts an item at the given index, so that the item can be retreived with the get function at that index. | 	Inserts an item at the given index, so that the item can be retreived with the get function at that index. | ||||||
| */ | */ | ||||||
|  | void TEMPLATE(insert,LIST_NODE)(LIST_TYPE data, int index, LIST_NODE* list){ | ||||||
| 	 | 	 | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
| Get list item: | Get list item: | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								test.c
								
								
								
								
							
							
						
						
									
										2
									
								
								test.c
								
								
								
								
							|  | @ -21,6 +21,8 @@ int main(int argc, char* argv[]){ | ||||||
| 	add_float_list(8.0, l); | 	add_float_list(8.0, l); | ||||||
| 	printf("%d\n", size_float_list(l)); | 	printf("%d\n", size_float_list(l)); | ||||||
| 	printf("%f\n", get_float_list(3, l)); | 	printf("%f\n", get_float_list(3, l)); | ||||||
|  | 	insert_float_list(15.05, 2, l); | ||||||
|  | 	printf("%f\n", get_float_list(1, l)); | ||||||
| 	free_float_list(l); | 	free_float_list(l); | ||||||
| 	 | 	 | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue