alvesoaj / eFLL

eFLL (Embedded Fuzzy Logic Library) is a standard library for Embedded Systems
MIT License
211 stars 91 forks source link

How to change the .cpp type code into .c #22

Closed xtrega closed 3 years ago

xtrega commented 4 years ago

Hello @zerokol . I'm new to programming and I want to learn about this Fuzzy logic on embedded system.

I already read on README.md about the code that written in c++/c, so, I want to ask you:

  1. I will using the code but not .cpp type, do I have to include the #include "stdlib.h" on the source code that I needed? If not, then do I have to change it myself from c++ source code to c?

Thank you and hope you answer this question.

alvesoaj commented 4 years ago

No, you don't need to include the standard c library. eFLL only uses it. To use eFLL you just need to include the Fuzzy classes. Take a look on example folder, there you can find some helpful stuff =)

xtrega commented 4 years ago

No, you don't need to include the standard c library. eFLL only uses it. To use eFLL you just need to include the Fuzzy classes. Take a look on example folder, there you can find some helpful stuff =)

Okay, I'll check it and learn more about it. Will ask you a question again if I still confused. Thank you! @zerokol

xtrega commented 4 years ago

Hello again @zerokol . I want to ask you again about this issues of mine. I still confused about the code, all of the codes are written in .cpp type. So, if i want to use it as a .c type, is that a right way to do it (adding the #include <stdlib.h>)? Thanks. image

alvesoaj commented 4 years ago

In what kind of machine are you planning to run it? I mean, will this run in you PC or notebook, or in a microcontroller?

Well, you can import c files, but, in this case, I guess you will need to make a fork of effl and add some code https://isocpp.org/wiki/faq/mixing-c-and-cpp take a look on it, and let me know if you want|can create a Pull Request to main library, It wold be great!