C++ functions .h and cpp file | Sololearn: Learn to code for FREE!


C++ functions .h and cpp file

When including a .h library file, is it possible to have functions running in the cpp file without a connection to main directly? I am trying to make a arduino debounce class function that is only used in the background. I just want to use the user interface to define in and output pins. I can get a working input, but thats it.

12/6/2018 11:48:25 PM


2 Answers

New Answer


Its a bit hard to interpret but I think it isn't possible(it would just become another header file),another alternative would be to define your functions in the .h file otherwise just define them in the main .cpp file


I'll give it a try as soon as i can. Thank you!