You can use puts or fputs instead of printf to print fixed strings. Or fputs("Deleting all elements.\n", stdout) Use puts or fputs to print fixed strings puts("Deleting all elements.") insert_element, delete_element, destroy_list. Insert, delete and destroy (and other verbs) aren't very descriptive because they're ambiguous on what to. See the next section for a better name for delete. You can use something like new_node to refer to a newly created node structure instead. Therefore it would be better to avoid these and other identifiers that happen to be C keywords. ![]() New and delete are C keywords and C code is commonly included in C programs. Avoids potential surprises if a header file alters macro definitions or compiler settings that affect subsequent code.Īvoid identifiers that clash with keywords of similar languages.Results in more comprehensible error messages when your declarations clash with those in an included header.Gives readers a quick glance at the libraries used throughout the source file.Include all library headers near the beginning of the file #include Printf("delete(
0 Comments
Leave a Reply. |