const char* ssid = "ssid"
OR
const char *ssid = "ssid"
Total newbie here just wondering which one is right when setting up a wifi connection? Or it doesn't make a difference?
I keep seeing it both ways in other peoples code
const char* ssid = "ssid"
OR
const char *ssid = "ssid"
Total newbie here just wondering which one is right when setting up a wifi connection? Or it doesn't make a difference?
I keep seeing it both ways in other peoples code
They are equivalent and declare a pointer to the ssid variable
thank you
I think this is better since it makes it explicitly clear that you're creating a constant char array:
const char ssid[] = "ssid";
But, if you insist on using the pointer notation, then use this to prevent your code from accidentally changing the pointer's value.
const char * const ssid = "ssid";