For publication, I anyway create a special version of a program where I not only obscure credentials etc. but remove todo lists and notes i’ve made about the development history which might be confusing to others.
Yes, but that is not noob-user friendly.
Without a credentials.h file the compiler will throw an error.
I think about beginning that way:
// Credentials
#if defined __has_include
#if __has_include ("credentials.h")
#include "credentials.h"
#else
// if you dont have a credentials.h file you may adjust the "secret Infos" inplace.
#define WIFI_SSID "secret Info"
#define WIFI_PASS "secret Info"
#endif
#endif
That way others can use the program directly by populating the secret info inplace and you may ignore it will use credentials.h
The other advantage, is that you are telling what your program expects from credentials.h.
By the way: you don’t have to enter the full path.
If you write #include “credentials.h” the compiler will first search for a file in your project folder then in the libraries.
If you write #include <credentials.h> the compiler will search for a file in the libraries.