How to use codes

hello, I want to add logical operator to my app and can someone help me to use code function correctly ? I added code function from “pages”-> “add selection”-> “code”.
I wrote code with C++ but it displayed just like a text so can U help me to use that function correctly?