Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project
See About the IDE 1.x category.
Create an instance? E.g. what you tried below makes dhcpSoftAP an instance of the String class. So you have to find out what class it has to be.
Post the complete error message.
I doubt that dhcpSoftAP should be a String (capital S). String objects don't have a member called dhcps_set_dns so I'm not surprised that it "didn't work".
Please post your code (using code tags) and the complete error message (also using code tags).
Tell us which board you're using (sounds like some form of ESP).
I'm not familiar with the ESP family so can't quite help.