So I have seen this quest a few times and I have tried wrapping it with static_cast(WIDTH) and static_cast(HEIGHT) however it just produces the same error and I am not too sure why it seem to me int to float shouldnt even need a narrowing conversion. I am currently learning ImGui and am getting this error when i compile Error C2398 Element '1': conversion from 'const int' to 'float' requires a narrowing conversion
This is my code
constexpr int WIDTH = 500;
constexpr int HEIGHT = 300;
}
//it is referenced later in this line in a different file that DOES include the header
void gui::Render() noexcept
{
ImGui::SetNextWindowSize({ WIDTH, HEIGHT });
}
//I have attempted to do a simple float conversion but it still screams at me with the same error