replaced c-style casts with c++ style
added std namespace qualifier on strncpy functions
replaced c-style casts with c++ style
replaced c-style casts with c++ style
replaced c-style casts with c++ style
replaced c-style casts with c++ style
replaced c-style casts with c++ style
replaced c-style casts with c++ style