How to escape sprintf() % marks so they wont be recognized as variables?

c++, windows

Solution

%% escapes the %

Problem

So is this even possible? If i some day wanted to `sprintf(str, "%doodle %d", var);` output "%doodle 123" and not "123oodle", how can i stop the first %d from being processed?

Original source