I incorporated usage of string variable and after compiling getting around 30 similar warnings. And program runs fine no memory leaks. Wondering why these errors...
All errors are of falls either of C4100, C4663, C4018, C4146, C4244:
*********************************************************
..\INCLUDE\xmemory(39) : warning C4100: '_P' : unreferenced formal parameter
*************************
..\INCLUDE\xlocale(296) : warning C4663: C++ language change: to explicitly specialize class template 'codecvt' use the following syntax:
template<> class codecvt<unsigned short,char,int>...
*************************
..\INCLUDE\xlocale(387) : warning C4018: '<' : signed/unsigned mismatch
*************************
..\INCLUDE\xlocale(204) : warning C4244: '=' : conversion from 'unsigned int' to 'char', possible loss of data
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xlocnum(151) : see reference to function template instantiation 'int __cdecl std::_Getloctxt(class std::istreambuf_iterator<char,struct std::char_traits<char> > &,class std::istreambuf_it
erator<char,struct std::char_traits<char> > &,unsigned int,const char *)' being compiled
*************************
..\INCLUDE\xlocnum(179) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xlocnum(168) : while compiling class-template member function 'class std::istreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_get<char,class std::istreambuf_itera
tor<char,struct std::char_traits<char> > >::do_get(class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,int &,unsigned short &) const'
*************************
All errors are of falls either of C4100, C4663, C4018, C4146, C4244:
*********************************************************
..\INCLUDE\xmemory(39) : warning C4100: '_P' : unreferenced formal parameter
*************************
..\INCLUDE\xlocale(296) : warning C4663: C++ language change: to explicitly specialize class template 'codecvt' use the following syntax:
template<> class codecvt<unsigned short,char,int>...
*************************
..\INCLUDE\xlocale(387) : warning C4018: '<' : signed/unsigned mismatch
*************************
..\INCLUDE\xlocale(204) : warning C4244: '=' : conversion from 'unsigned int' to 'char', possible loss of data
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xlocnum(151) : see reference to function template instantiation 'int __cdecl std::_Getloctxt(class std::istreambuf_iterator<char,struct std::char_traits<char> > &,class std::istreambuf_it
erator<char,struct std::char_traits<char> > &,unsigned int,const char *)' being compiled
*************************
..\INCLUDE\xlocnum(179) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
D:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xlocnum(168) : while compiling class-template member function 'class std::istreambuf_iterator<char,struct std::char_traits<char> > __thiscall std::num_get<char,class std::istreambuf_itera
tor<char,struct std::char_traits<char> > >::do_get(class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::istreambuf_iterator<char,struct std::char_traits<char> >,class std::ios_base &,int &,unsigned short &) const'
*************************