1 Attachment(s)
What's wrong with my std::ostringstream usage
Tried to my update my window title with some performance metrics for my vulkan renderer with std::ostringstream. When i run it tells there's access violattion leading to xtring file funtion size_t length(_In_z_ const _Elem* const _First) where the the _First parameter is null as shown on picture below. Here's the code i wrote
Code:
void ApplicationBaseVk::UpdatePerformanceMatrics()
{
std::ostringstream osstream;
osstream << mWindowTitle << " Frametime : " << mDeltaTime << " FPS : " << 1.0f / mDeltaTime;
glfwSetWindowTitle(mWindow, osstream.str().c_str());
}
Attachment 36049
Or maybe i've done in wrong way.I'm running latest msvc 2022.Sorry for my bad english.Thank you
Re: What's wrong with my std::ostringstream usage
Update : It turns out I forgot to do
Code:
mWindowTitle = appName;
in my app initialization function.Foolish me. Sorry for the trouble. Have a nice day folks.
Re: What's wrong with my std::ostringstream usage
We've all made stupid mistakes at least once, twice...