Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7072307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:47:34+00:00 2026-05-28T05:47:34+00:00

This is a very general question. I’m a self taught ‘programmer’ who programs in

  • 0

This is a very general question. I’m a self taught ‘programmer’ who programs in C#. A project I would like to work on would be made a whole lot easier (in the grand scheme of things) if I knew C++. How easy is it to move from C# to C++? Any pitfalls I should watch out for? And if I am using VS2010, can I program (not in the same class, but same project) something in both C# and C++?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:47:35+00:00Added an answer on May 28, 2026 at 5:47 am

    Moving from C# to C++ is not easy. The basic syntax can appear the same (e.g. if, for…), but there are deep differences, e.g. the RAII pattern and stack-semantics variables whose destructors are called when they go out of scope, etc. are not present in C#.

    Moreover, C# uses a non-deterministic garbage collector (which can be OK for memory resources, but is useless for other kind of resources). Instead, with modern C++, you can use templates and smart pointers (like std::/boost::*shared_ptr*), which allow you to have deterministic reference-counted “garbage collection”, which is very efficient, and is valid for both memory and non-memory resources (like file handles, sockets, textures…).

    Moreover, the C# generics are very different from C++ templates (C++ templates are very powerful, and allow an advanced level of programming called template meta-programming).

    In VS2010 you can have a solution hosting both C++ and C# projects. To communicate between the two worlds (the native world of C++ and the managed world of .NET/C#) you can use C++/CLI as a kind of bridging layer.

    In Windows 8 a new technology should be introduced, called WinRT (based on COM), which allows inter-language communication. In this case, you can use C++ with WRL (a template-based library) or C++/CX language extensions to build C++ components that can be used from C# and .NET.

    Happy learning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a very general question: I was wondering whether it is possible to
This is a very general question but it's based on a specific problem. I've
This is a very general question, but here goes: I'm trying to create a
This is another very general question. I'm wondering why anyone ever needs to use
This is a very general question. I am a bit confused with the term
This is a very general and noob question, but I am a noob with
This is a very general question that's not related to a specific language. I'm
This is a very general open question What is the best way to provide
Just a very general question, that not only applies to this example. Let's say
I think This question might be very general...I am new to Serial port programming

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.