Pages: [1]   Go Down
Author Topic: Wire.h header problem with object and inhereted functions  (Read 190 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using the Wire.cpp library and if you open the file you will see at the end.This line

   
Code:
extern TwoWire Wire;

The lib is by default inside Arduino IDE at the examples. I am using Eclipse. I get an error that a method must be implemented.

> Description Resource Path Location Type The type 'TwoWire' must
> implement the inherited pure virtual method 'Print::write' Wire.h
> /ArduinoCore/src line 76 Code Analysis Problem

I do not know how to implement it. What should this function do? should just open and close brackets?

So i understand the problem but how can write in the function at its implementation?
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 616
Posts: 49449
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You should try compiling and linking the code using the IDE. You will get more explicit messages. The Print class defines two write() methods, but does not implement them. Derived classes are supposed to. What I think you will find is that the derived class does have two write() methods, but that they have the wrong signature. Fix the signature, and add the now required return statement, and you'll be good to go.
Logged

Pages: [1]   Go Up
Jump to: