When to use a .C library vs a .CPP library

Feel free to make libraries written in C++. I think the existing libraries don't go all out and make it all C++ so that the syntax is slightly less confusing for newcomers or C programmers, but C++ can really serve the needs of small programs just as well as C.

If you're going to make C library functions usable from a user's C++ sketch, you just need to ensure that your header file is explicit about its C nature.

MyLibraryWrittenInC.h

[glow]#ifdef __cplusplus
extern C {
#endif[/glow]

/* prototypes for functions implemented in C */
int myCfunction(float, char, int);

[glow]#ifdef __cplusplus
} // extern C
#endif[/glow]