| | |
Multifile programs
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Care to elaborate what you are trying to convey here by posting your code or with an example....
Or is it that you have declared all the global data or variables in one file and want your progams to access those ?
Or is it that you have declared all the global data or variables in one file and want your progams to access those ?
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
•
•
•
•
globals are evil. They reek of design errors.
But if you insist on using them, put them in a header file you #include in everything.
extern declarations in the header file and leave the globals defined in one source file. The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
![]() |
Similar Threads
- Web Graphic Programs....Design? (Graphics and Multimedia)
- Plz help : Multifile C programs (details included) (C++)
- article on affiliate programs (Advertising Sales Strategies)
Other Threads in the C Forum
- Previous Thread: How to Implement NFS
- Next Thread: Can a function return 2 values?
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays asterisks binarysearch calculate centimeter char command convert copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax directory drawing dynamic executable fflush file fork forloop frequency getlasterror givemetehcodez graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators infiniteloop kernel km lazy linked linkedlist linux linuxsegmentationfault list lists locate logical_drives match matrix microsoft motherboard multi mysql number open opendocumentformat opensource owf pattern pdf performance pointer pointers posix problem probleminc program programming radix recursion recv repetition research scanf scheduling scripting segmentationfault send sequential shape socketprograming spoonfeeding stack standard string strings structures student systemcall testautomation turboc unix user variable voidmain() wab windows.h






