Im 24 and a time ago..when i was a junior and senior in high school i did some programming. We used basic...lol...then turbo pascal...lol...and just touched on C in my senior year...All the old guys with me remember basic...

anyway, I'm going back to school for a degree in Computer Information Systems and I have the whole .net package... I haven't started any programming specific classes yet.

so whats the difference between C++ .net and c++ anything else? is the syntax the same???

Dani AI

Generated

Short answer: you can think of two C++ "modes" you'll meet. One is standard (ISO) C++, which compiles to native machine code and uses manual resource management (RAII). The other is the managed flavor used with .NET (historically Managed C++, now C++/CLI) which adds language extensions and targets the CLR/IL runtime. Basic native C++ syntax still works, but C++/CLI introduces new keywords and a different memory/runtime model.

To expand on points from and : .NET itself is a runtime and class library, not a single language. C++/CLI is a Microsoft extension that lets you write managed types (for example ref class, gcnew, and the handle ^) and also mix native and managed code in the same project. That mixed-mode capability is its main use: wrap existing native libraries for use by .NET UI or services. It is not a drop-in replacement for ISO C++ if you need portable, cross-platform native code; for cross-platform work prefer standard C++ or cross-platform .NET (Core/.NET 5+ or Mono) rather than C++/CLI which is largely MSVC/Windows-centric.

If you’re starting a CIS/.NET track: learn .NET concepts with C# first (clearer .NET idioms and tooling), and learn modern ISO C++ separately for systems-level work. Use C++/CLI only when you need tight interop between native C++ and .NET. Visual Studio gives the RAD experience mentioned, including mixed-mode project templates and debugging.

Small example of the managed-only syntax (shows how C++/CLI looks):

ref class ManagedThing {
public:
    void DoWork() { }
};

ManagedThing^ m = gcnew ManagedThing();

Troubleshooting notes: enable mixed-mode compilation (MSVC /clr) when combining code; convert between System::String^ and std::string explicitly (or use msclr::interop::marshal_as); watch lifetimes—C++ destructors map to IDisposable patterns while finalizers run under GC.

Recommended Answers

All 3 Replies

.NET is entirely object oriented from what I understand - there is no getting around it as with C++ and C doesn't support OOP at all. I don't know much else about it really. I'd really like to wish you the best of luck on your degree, but as far as your question goes, all I can do is wish you luck and twiddle my thumbs until someone more experienced comes a'callin.

C++ is an improvement on C in the sense of OOP. It tries to be an complete OOP language, but its cousin Java 2 is much more robust in the OOP programming than C++.

C++.Net is C++ in the .Net environment. Making it Cross platform compatible ( the one thing C++ lacked was portability like Java 2), and C++.Net uses OOP to its fullest with the .Net Framework to draw on.

Hope this helps... I am in the weee hours of the morning writiing this ...

The .net suite is also more centered around RAD (Rapid Applications Development). You can go from scratch to having a fully blown program pretty quickly in the .net enviroment.

Chester

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.