|
Prev: accessing a library
Next: passing vector as argument
From: Daniel on 22 Apr 2008 20:50 I wrote code to declare a vector to use unsigned long long. However, I get a warning telling me that the vector is of type unsigned integer. What can I do to make the vector use unsigned long long? vector <unsigned long long> v(100000);
From: Igor Tandetnik on 22 Apr 2008 21:12 "Daniel" <Mahonri(a)cableone.net> wrote in message news:uEuEZwNpIHA.4848(a)TK2MSFTNGP05.phx.gbl > I wrote code to declare a vector to use unsigned long long. However, > I get a warning telling me that the vector is of type unsigned > integer. What can I do to make the vector use unsigned long long? > > vector <unsigned long long> v(100000); Show the code that generates the warning, and the exact text of the warning. -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925
From: Daniel on 22 Apr 2008 21:17 Here is the exact message: warning C4244: 'argument' : conversion from 'unsigned __int64' to 'unsigned int', possible loss of data "Igor Tandetnik" <itandetnik(a)mvps.org> wrote in message news:upk1c8NpIHA.2068(a)TK2MSFTNGP05.phx.gbl... > "Daniel" <Mahonri(a)cableone.net> wrote in message > news:uEuEZwNpIHA.4848(a)TK2MSFTNGP05.phx.gbl >> I wrote code to declare a vector to use unsigned long long. However, >> I get a warning telling me that the vector is of type unsigned >> integer. What can I do to make the vector use unsigned long long? >> >> vector <unsigned long long> v(100000); > > Show the code that generates the warning, and the exact text of the > warning. > -- > With best wishes, > Igor Tandetnik > > With sufficient thrust, pigs fly just fine. However, this is not > necessarily a good idea. It is hard to be sure where they are going to > land, and it could be dangerous sitting under them as they fly > overhead. -- RFC 1925 >
From: Igor Tandetnik on 22 Apr 2008 21:32 "Daniel" <Mahonri(a)cableone.net> wrote in message news:%236kh9%23NpIHA.552(a)TK2MSFTNGP06.phx.gbl > Here is the exact message: > > warning C4244: 'argument' : conversion from 'unsigned __int64' to > 'unsigned int', possible loss of data You haven't shown the line of code this warning refers to. -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925
From: Daniel on 22 Apr 2008 21:46
Here it is along with the declaration: using namespace std; vector <unsigned long long>::iterator vIter; vector <unsigned long long> v(100000); v[100000-x]=x*1000000000000; "Igor Tandetnik" <itandetnik(a)mvps.org> wrote in message news:uUm$fHOpIHA.3960(a)TK2MSFTNGP02.phx.gbl... > "Daniel" <Mahonri(a)cableone.net> wrote in message > news:%236kh9%23NpIHA.552(a)TK2MSFTNGP06.phx.gbl >> Here is the exact message: >> >> warning C4244: 'argument' : conversion from 'unsigned __int64' to >> 'unsigned int', possible loss of data > > You haven't shown the line of code this warning refers to. > -- > With best wishes, > Igor Tandetnik > > With sufficient thrust, pigs fly just fine. However, this is not > necessarily a good idea. It is hard to be sure where they are going to > land, and it could be dangerous sitting under them as they fly > overhead. -- RFC 1925 > |