Skip to content

missing void on NewPing::begin() #4

@e-tinkers

Description

@e-tinkers

You may want to correct the error on your NewPing::begin() method declaration on NewPing.cpp line 35. It cause this error during compilation:

C:\Users\somebody\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\somebody\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\somebody\Documents\Arduino\libraries\Arduino_New_Ping-master\src\NewPing.cpp:8:0:

C:\Users\somebody\Documents\Arduino\libraries\Arduino_New_Ping-master\src\NewPing.h:213:10: error: candidate is: void NewPing::begin()

void begin();

^~~~~

exit status 1

It should be:

void NewPing::begin() {

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions