• Saves Valuable Time
  • Trusted Accuracy for 12 Years
  • 15-Day Money-Back Guarantee

C++ Equivalent to VB Properties

C++ does not have properties, so you must use get/set methods instead:

VB C++
Public Property IntProperty() As Integer
    Get
        Return intField
    End Get
    Set(ByVal value As Integer)
        intField = value
    End Set
End Property
public:
int getIntProperty() const
{
    return intField;
}
void setIntProperty(const int &value)
{
    intField = value;
}


Use VB to C++ Converter to convert from VB to C++.     

Additional resource: VB.NET and C++ Equivalents


Copyright © 1997 – 2017 Tangible Software Solutions Inc.