Help please.
how can i fix this error
Arduino: 1.8.11 (Windows 10), Board: "Arduino Uno"
C:\Users\LENOVO\Documents\Arduino\libraries\Arduino_New_Ping-master\src\NewPing.cpp:35:16: warning: ISO C++ forbids declaration of 'begin' with no type [-fpermissive]
NewPing::begin() {
^
C:\Users\LENOVO\Documents\Arduino\libraries\Arduino_New_Ping-master\src\NewPing.cpp:35:1: error: prototype for 'int NewPing::begin()' does not match any in class 'NewPing'
NewPing::begin() {
^~~~~~~
In file included from C:\Users\LENOVO\Documents\Arduino\libraries\Arduino_New_Ping-master\src\NewPing.cpp:8:0:
C:\Users\LENOVO\Documents\Arduino\libraries\Arduino_New_Ping-master\src\NewPing.h:213:10: error: candidate is: void NewPing::begin()
Despite the name, Arduino_New_Ping is a Particle library, not an Arduino library. They tend to look very much the same, and there is no reason a library can't be made to work with Arduino and Particle, but the Particle community has a nasty habit of taking Arduino libraries and making unnecessary changes that break Arduino community, yet still advertising them as "Arduino".
The solution is to install the real NewPing library that eliteio copied and ruined:
Delete C:\Users\LENOVO\Documents\Arduino\libraries\Arduino_New_Ping-master. Please be very careful when deleting things from your computer. When in doubt, back up!
(In the Arduino IDE) Sketch > Include Library > Manage Libraries
In the "Filter your search" field, type "newping".
Click on "NewPing by Tim Eckel".
Click the "Install" button.
Wait for the installation to finish.
Click the "Close" button.
UKHeliBob is right that it would be useful to see your code. If your code was written specifically for the Arduino_New_Ping library, it's possible some changes will be necessary to port it to work with the NewPing library. I suspect that the API of the two libraries are the same, or at least very similar, but I haven't checked. Ideally, you would only need to change this line of your sketch: