When I go to the MSDN page for the SqlConnection class, it only shows examples in C# and VB. Why doesn’t MSDN show a C++ example?
I am particularly interested in how a C++ example would get around the lack of the using keyword in C++.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Hmmm… after reading What is the Managed C++ equivalent to the C# using statement it seems that the equivalent of:
is actually:
That is quite impressive, since C++ does not “lack” the
usingstatement as much as it removes the need for it entirely! I don’t think that C#/VB programmers sufficiently appreciate that advantage of C++ (I certainly didn’t 🙂 .