On 28/11/2016 04:18, nick wrote: > I am wondering for the below code: Hello Nick, Does your code work with a different compiler, and not with gcc? If you're just asking general C++ programming questions, I would suggest the comp.lang.c++ Usenet newsgroup. Also, posting 300+ lines of source code asking "why doesn't this work?" is unlikely to have many people jumping in to help out, in my experience. You need to trim your code to the smallest possible instance that still exhibits the issue you're running into. Regards.