C++ functions .h and cpp file | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula gr√°tis
0

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.

6th Dec 2018, 11:48 PM
Guitarman
2 Respostas
+ 1
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
7th Dec 2018, 8:16 AM
Mensch
Mensch - avatar
0
I'll give it a try as soon as i can. Thank you!
8th Dec 2018, 3:57 PM
Guitarman