If I just include existing Standard C++ class in C++/CLI program, will it work?
In my tests everything worked pretty good, but is it true for every program?
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.
That is what Microsoft promises, yes. (I watched this video yesterday, in which they explicitly mentioned this — specifically because the addition of
nullptrin C++0x would compromise it)So yeah, if you take a native C++ program and compile it as C++/CLI, with no code changes, then yes, it will still work.
And of course, if you change your code (gcnew instead of new and other “managed” changes, then of course, all bets are off, and you might or might not break the code)