Writing .Net window application in C++

I have a task to do: I have to write a graphical (window) application in .Net which is going to read temperature from the three sensors (namely MCP9808, SI7051 and STS31-DIS) connected via MCP2221 I2C/USB converter and display it on the screen.

There are some requirements: The app has to be graphically estetic, it has to have the some buttons (eg for the periodic read of the temperature) and it has to display a chart showing the temperature variations.

I know that .Net usually comes with C# but I've never used it before and also the libraries for the MCP2221 are for C++ as I believe.

Could anyone help me how to get down to this problem?

1 answer

  • answered 2018-07-12 07:47 asidis

    If you really need to use .NET for your GUI (WPF or WinForms), you should consider .NET interoperability, which allows you to call C++ compiled code from your .NET code.

    Here is another StackOverflow post that should help you:

    How to call C++ DLL in C#

    If you want to use C++ syntax only, there is also C++/CLI.