• Saves Valuable Time
  • Trusted Accuracy since 2004
  • 15-Day Money-Back Guarantee

C++ Equivalent to the VB 'Using' Statement

VB C++
Using f As New Foo()
End Using
    Foo *f = new Foo();
    delete f;

or, if 'Foo' is designed for RAII:

    Foo f;

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

Additional resource: VB.NET and C++ Equivalents

Copyright © 2004 – 2021 Tangible Software Solutions, Inc.