replaced some stdc++ functions with Qt equivalents