How to build collision for walls of a room?

I’m trying to build my room with C++ according to this , i drew my room successfully but when the walls have only one face, then my player can go through walls directly. it seems there is no such problem with walls of two faces. So, where is the problem? what can i do if i want to tackle this problem? should i build collisions for every wall?