Click here to Skip to main content
15,889,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i have query regarding ubound in c++ and vb .


in VB they have done like below:

UBound(muEntData) and some times UBound(muEntData,1) what the difference between two as

muEntData is a Type(VB) or structure


in C++ iam using vector with structure muEntData how to do it in vector as

If m_nPntr(int) = UBound(muEntData) ( this is there in vb) and how to do it vector c++ condition

What I have tried:

i tried i like this:

std::sort(muEntData.begin(), muEntData.end());
std::vector<mtentdata>::iterator up;

up = std::upper_bound(muEntData.begin(), muEntData.end(), 1);
int k = up - muEntData.begin();
if ( m_nPntr == k)


error C2893: Failed to specialize function template 'unknown-type std::less<void>::operator ()(_Ty1 &&,_Ty2 &&) const' c:\program files (x86)\microsoft visual studio 12.0\vc\include\algorithm

its throwing error for sort and how to do as per vb please let me know
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900