---
# System prepended metadata

title: debug

---

# debug
```
#include "ByteBuffer.h"
^~~~~~~~~~~~~~
"bytebuffer.h"
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:22:1: error: use of undeclared identifier 'ByteBuffer'; did you mean 'gxByteBuffer'?
ByteBuffer::ByteBuffer(uint32_t size): _head(0), _tail(0), _size(0), _buf(NULL)
^~~~~~~~~~
gxByteBuffer
./include\ByteBuffer.h:65:7: note: 'gxByteBuffer' declared here
} gxByteBuffer;
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:22:13: error: C++ requires a type specifier for all declarations
ByteBuffer::ByteBuffer(uint32_t size): _head(0), _tail(0), _size(0), _buf(NULL)
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:22:38: error: only constructors take base initializers
ByteBuffer::ByteBuffer(uint32_t size): _head(0), _tail(0), _size(0), _buf(NULL)
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:24:12: error: use of undeclared identifier '_size'
resize(_size);
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:27:1: error: use of undeclared identifier 'ByteBuffer'; did you mean 'gxByteBuffer'?
ByteBuffer::~ByteBuffer()
^~~~~~~~~~
gxByteBuffer
./include\ByteBuffer.h:65:7: note: 'gxByteBuffer' declared here
} gxByteBuffer;
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:27:14: error: expected the class name after '~' to name a destructor
ByteBuffer::~ByteBuffer()
^~~~~~~~~~
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:33:6: error: use of undeclared identifier 'ByteBuffer'; did you mean 'gxByteBuffer'?
void ByteBuffer::resize(uint32_t size)
^~~~~~~~~~
gxByteBuffer
./include\ByteBuffer.h:65:7: note: 'gxByteBuffer' declared here
} gxByteBuffer;
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:33:18: error: out-of-line definition of 'resize' does not match any declaration in 'gxByteBuffer'
void ByteBuffer::resize(uint32_t size)
^~~~~~
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:35:14: error: use of undeclared identifier '_buf'
delete[] _buf;
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:36:5: error: use of undeclared identifier '_head'
_head = 0;
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:37:5: error: use of undeclared identifier '_tail'
_tail = 0;
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:38:5: error: use of undeclared identifier '_size'; did you mean 'size'?
_size = size + 1;
^~~~~
size
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:33:34: note: 'size' declared here
void ByteBuffer::resize(uint32_t size)
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:39:5: error: use of undeclared identifier '_buf'
_buf = new uint8_t[_size]();
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:39:24: error: use of undeclared identifier '_size'; did you mean 'size'?
_buf = new uint8_t[_size]();
^~~~~
size
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:33:34: note: 'size' declared here
void ByteBuffer::resize(uint32_t size)
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:42:6: error: use of undeclared identifier 'ByteBuffer'; did you mean 'gxByteBuffer'?
void ByteBuffer::push(uint8_t data)
^~~~~~~~~~
gxByteBuffer
./include\ByteBuffer.h:65:7: note: 'gxByteBuffer' declared here
} gxByteBuffer;
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:42:18: error: out-of-line definition of 'push' does not match any declaration in 'gxByteBuffer'
void ByteBuffer::push(uint8_t data)
^~~~
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:44:5: error: use of undeclared identifier '_buf'
_buf[_tail] = data;
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:44:10: error: use of undeclared identifier '_tail'
_buf[_tail] = data;
^
.\mbed-os\drivers\source\usb\ByteBuffer.cpp:45:5: error: use of undeclared identifier '_tail'
_tail++;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
```