Restart my game

Hello guys, anyone know how can i restart my game from the start point after the player is dead? Is there a way to reset sdl_gettick() func?

As far as I can tell, you can only do that if you shutdown SDL and then restart it, not a good idea. Instead you should probably create another variable that has the ticks when you start your game/life/level, and then subtract that from the current amount of ticks. That should get you the functionality of what you want without having to constantly restart the library.

Think about it in this way

game_loop();
load_init_values();

main()
{
while(game_is_running)
{
if(game_state == 1)
{
load_init_values();
game_state = 2;
}
if(game_state == 2)
{
game_loop();
if(user_presses_restart)
{
game_state = 1;
}
}
}
}