Timeline for This is a simple stopwatch cli application with a few options
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 25 at 17:36 | vote | accept | lull | ||
Mar 25 at 17:35 | comment | added | lull | Now I see what you are saying. Appreciate the patient explanation. | |
Mar 25 at 16:27 | comment | added | Cris Luengo |
@patrick You can put all the text of the .h file into the .c file where you #include it. This is exactly what the pre-processor does before the compiler gets to it. There is no need for a separate header file if you aren’t going to include it in multiple source files.
|
|
Mar 25 at 14:46 | comment | added | lull | I get "conflicting types" warnings if I remove the header. I think related to this: stackoverflow.com/questions/1779358/… | |
Mar 25 at 14:30 | history | edited | Harith | CC BY-SA 4.0 |
added 837 characters in body
|
Mar 25 at 14:23 | history | edited | Harith | CC BY-SA 4.0 |
added 837 characters in body
|
Mar 25 at 13:13 | comment | added | Harith |
This is a stand-alone program, and everything is in a single file, and all the functions have been defined before main() , so I see 0 point in putting the declarations in a header file and including that. You're not perchance trying to distribute it as a library, are you? See: stackoverflow.com/a/48830403/20017547
|
|
Mar 24 at 20:46 | comment | added | lull |
You mean you don't see what the point of the sw.h file is? I thought it was just good practice to always include a header file. Doesn't it make it the order of function declaration unimportant then? And I'm not familiar with the ptr[static 1] notation, maybe I'm googling the wrong thing, do you have a resource?
|
|
Mar 24 at 20:21 | history | edited | Harith | CC BY-SA 4.0 |
added 358 characters in body
|
Mar 24 at 20:14 | history | edited | Harith | CC BY-SA 4.0 |
added 247 characters in body
|
Mar 24 at 20:05 | history | answered | Harith | CC BY-SA 4.0 |