Jump to content
Sign in to follow this  
fransp

Need Some Help On Multiple Files.

Recommended Posts

Hi All

 

 

I come from other languages and switched to C recently.

 

Who can me guide to a good tutorial about the use of the #include of .h and .c files.

Let me be clear, I do not want how to use them, like you must put is there and there and this and that, because that does not work for me, I want to know why I am using them only then I can understand what to put in it.

 

Despite a course on C, the in and outs of #include, .h etc, did not became any clearer to me.

So up to now all my project code is in one file.

 

I tried a lot with the ' add file to project' of BoostC, but that did not ring a bell to bell either.

 

Any suggestions, except quitting, other job, other language etc, are appriciated.

 

 

With best regards,

 

Frans.

Share this post


Link to post
Share on other sites

Try this link: Header Files

 

To keep code well organized, keep the header file in such a way that, if you compile the source code into a library, the header file will require no or small revision.

 

But take care: some older BoostC version doens´t check header files date (don´t know about current version). And take a look at rs232 header, full of code: why don´t they follow those guidelines?

Share this post


Link to post
Share on other sites
...And take a look at rs232 header, full of code: why don´t they follow those guidelines?...

 

Because rs232 header (as well as lcd header) contains function templates which must be in a header by definition.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites
Try this link: Header Files

 

To keep code well organized, keep the header file in such a way that, if you compile the source code into a library, the header file will require no or small revision.

 

But take care: some older BoostC version doens´t check header files date (don´t know about current version). And take a look at rs232 header, full of code: why don´t they follow those guidelines?

 

 

Hi LcSD53,

 

Thanks for the link. I did a quick read, it may take awhile before I realy understand it.

 

The last pragraph of the text in the link does not make things better.

 

I hope I will be cured some day. :-)

In the mean time it will be trial and error. I guess.

 

With best regards,

 

Frans.

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...