Store bool in .txt

Whats the proper format to store a bool value in a txt file for future loading?

i tried using 0 and 1 and the 0 works but the 1 doesn't seem to return as true.
i tried using true and false but those dont seem to be working at all. i use the

file << boolvar;

operation
Topic archived. No new replies allowed.