[英]Arduino no matching function for call to
I have created program for my arduino uno, but I cannot compile it. 我已经为arduino uno创建了程序,但是我无法编译它。 Program based on IRemote IRecord example, and SD example. 基于IRemote IRecord示例和SD示例的程序。
CODE: 码:
void sendCode(int repeat) {
strcodeValue = String(codeValue);
char filename[strcodeValue.length()+1];
strcodeValue.toCharArray(filename, sizeof(filename));
if (SD.exists(filename)) {
File myFile = SD.open(filename);
if (myFile) {
while (myFile.available(filename)) {
codeValue = myFile.read();
}
myFile.close();
}
}
...
}
ERRORS: 错误:
IRrecord.ino: In function 'void sendCode(int)':
IRrecord.ino:130:37: error: no matching function for call to 'File::available(char [(((sizetype)<anonymous>) + 1)])'
IRrecord.ino:130:37: note: candidate is:
In file included from IRrecord.ino:18:0:
C:\Program Files (x86)\Arduino\libraries\SD\src/SD.h:38:15: note: virtual int File::available()
virtual int available();
^
C:\Program Files (x86)\Arduino\libraries\SD\src/SD.h:38:15: note: candidate expects 0 arguments, 1 provided
Error compiling.
File name will be read from IR Sensor. 文件名将从红外传感器读取。
Can anyone help me? 谁能帮我?
It surely looks like 它肯定看起来像
while (myFile.available(filename)) {
should read 应该读
while (myFile.available()) {
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.