When is it ok to cuss in front of a child?

I mean, eventually, they will start cussing if it’s not me, then probably their teacher, friends, or tv will do.