Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

usage of string

Status
Not open for further replies.

vaquar

Programmer
Jun 27, 2001
12
US
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'
*************************
 
try
#pragma warning(disable:C4100)
#pragma.....
#include<string>
#pragma warning(once:C4100)
...
John Fill
1c.bmp


ivfmd@mail.md
 
Hi John,

By using #pragma,
the warning increased by 5 (from 30 to 35)

Could you suggest me something else...?

I even tried by changing warninig level in Project Setting(c/c++), but no use.

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top