Your std::vector contains elements of type Test*, not Test.
Therefore your lambda should accept references to Test* objects, and dereference the pointers with operator->.
Since you do not need to modify these objects, it is better for your lambda to accept the arguments by a const reference.
A complete example:
#include <vector>
#include <algorithm>
struct Test
{
int Current;
int Max;
};
int main()
{
std::vector<Test*> VectorA;
std::sort(VectorA.begin(),
VectorA.end(),
//---------------vvvvv--------------vvvvv--------------
[](Test* const& test, Test* const& test2)
//----------------------------vv---------------vv-----------
{ return (test->Current > test2->Current) && (test->Max > test2->Current); });
return 0;
}
Edit: my answer above addressed only the issue of the c++ syntax itself.
As commented below by @Jarod42, there is also a semantic issue here - your comparison logic does not comply with strict weak ordering (see: Wikipedia - Weak Ordering).
Test*, notTestas your lambda implies.