Yes, in the ESP32 examples. But if you look at the ESP8266 examples you’ll see:
#ifndef ESP8266
#error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.
#endif
Is your second access point set-up as a DCHP server?
There’s quite a few topics on hard-coding multiple SSIDs, maybe this is the simplest to run with…
Pete.