I don't know what complier you are using, but the code you have posted doesn't comply with ANSI c++ and won't be portable across different compilers eg. your code doesn't compile with Microsoft Visual Studio. I would suggest strongly that unless there is a very good reason you should write ANSI compliant c++.