No matching function for call to "MCP_CAN::Begin(int)

Hello,

I am using a Jay Consystem CAN bus shield for the arduino uno. I am also using the BUS library found here: GitHub - coryjfowler/MCP_CAN_lib: MCP_CAN Library. I'm using this example code that I found in a book:

#include "mcp_can.h"
#include "mcp_can.cpp"
#include "mcp_can_dfs.h"
#include <SPI.h>
MCP_CAN CAN0(10);

unsigned char stmp[8] = {0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37};


void setup()
{
  Serial.begin(9600);
  if (CAN0.begin(CAN_250KBPS) == CAN_OK)
    Serial.print("CAN Init OK.");
  else
    Serial.print("CAN Init Failed.");
}

void loop()
{
  CAN0.sendMsgBuf(0x1FF, CAN_EXTID, 8, stmp);
  delay(1000);
  
}

I make sure to include the three files that were needed for the projects. mcp_can.cpp, mcp_can.h, and mcp_can_dfs.h. Now from there, I verify the code and get the following error:

Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\David\Documents\Arduino\CAAN_TEST\CAAN_TEST.ino: In function 'void setup()':

CAAN_TEST:13: error: no matching function for call to 'MCP_CAN::begin(int)'

   if (CAN0.begin(CAN_250KBPS) == CAN_OK)

                             ^

C:\Users\David\Documents\Arduino\CAAN_TEST\CAAN_TEST.ino:13:29: note: candidate is:

In file included from C:\Users\David\Documents\Arduino\CAAN_TEST\CAAN_TEST.ino:3:0:

sketch\mcp_can.cpp:740:7: note: byte MCP_CAN::begin(byte, byte, byte)

 INT8U MCP_CAN::begin(INT8U idmodeset, INT8U speedset, INT8U clockset)

       ^

sketch\mcp_can.cpp:740:7: note:   candidate expects 3 arguments, 1 provided

exit status 1
no matching function for call to 'MCP_CAN::begin(int)'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Can anyone please help. Thank you very much

If you look in mcp_can.h you see that the only begin function takes 3 uint8 arguments.

There was an earlier version of mcp_can.h that had a begin function that took only one argument. Perhaps this is the version that the example code in the book used.

Either install the old version that the book used, or be prepared to make adjustments from the book's examples to use the newer library.

Good Luck!