I'm getting an Expected a Statement error in this else statement
if (surface == NULL);
std::cout << "error" << std::endl;
else
{
optimizedSurface = SDL_ConvertSurface(surface, windowSurface->format, 0);
}
How do I fix this?
remove the ;
after if
. if (surface == NULL);
should be if (surface == NULL)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.