vedangjavdekar / Raylib-Text-Editor

A basic text editor made using raylib
MIT License
7 stars 0 forks source link

Use of undeclared identifier 'itoa' #1

Open gnuchanos opened 11 months ago

gnuchanos commented 11 months ago
for (int i = 0; i < m_Lines.size(); ++i)
{
    const char* lineNumber = itoa(i + 1, buffer, 10);
    int width = MeasureText(lineNumber, 20);
    DrawText(lineNumber, 15 - width, 10 + i * 20, 20, GRAY);
}

what is this

vedangjavdekar commented 11 months ago

itoa is a cstdlib function that converts number into a string based on the radix provided. It's using that function for converting the index to c string.

Please check if the latest commit bdb8e48 fixes it for you.

Thanks!