TPECI

Hi everybody
i am starting a new project and i ma in doubt about my programming language, should i use native c++ managed c++.

i should use following thing in my project:
wlan communication.
direct input.
direct show ( previewing)
direct sound (capture wave)
using usb.

so know please tell me which one give me more freedom to do my project.



Re: Visual C++ General Which One(Managed C++ or Native C++)

NeederOfVBHelp

Really, we need more information on your project to help you out, but form what you've said I would go with C++/CLI (C++/CLI = Managed, but do not use MC++, it is horrible).

Native C++ is much more powerful, and gives you much more freedom in general; I don't care what any one says, being able to minipulate memory is freaking awesome. But in your case, I doubt that you will need any of the few addition abilities that native C++ provides. It seems to me that the .NET framework will benifit your project a lot and thus I suggest C++/CLI. the .NET framework provides all sorts of neat features that will probally cut your development time in half.

Also keep in mind, as far as performance goes they are almost exactly the same, it is a myth that Native C++ is faster, this is becuase the CLR can optimize for the spesific processor instead of just targeting x64 or x86 like native C++; although I suppose it depends on the situation to a large extent as well.

But the great thing is you don't have to pick just one, if you need funtion pointers, or pointer math then you can mix and match small parts of native into your managed.





Re: Visual C++ General Which One(Managed C++ or Native C++)

TPECI

Hi thank you for your help.

i my self think , it is better to use both but i am sure i will face with lot of problem as i faced befor for mixing them.

i have post which i've gave no answer. and the problem was about functions pointer .....

but considering all you said i think i will use managed c++. actually i don not have enought time.

and something else , In my project i need some help if someone help to finish it i would be greate.

some detail about the project:

it is about a robot wich a should control with wireless lan, there are 3 camera that i should preview and 10 electronic boards which all are connected to the

computer that is on the robot by USB. i should control the robot's movements with 2 gamepad one for main camera and the other for robot itself.

and there are 2 microphone as well.

with these informaion if anybody can help me please tell me , i really need help.





Re: Visual C++ General Which One(Managed C++ or Native C++)

Alex Farber

I am currently developing application which works with number of digital careras using native C++ interface, and with different hardware devices using parallel port (in the future parallel port will be replaced with USB). Program contains GUI, graphics and database access. I use 3 languages for this:
1. C# - for GUI and everything that is possible to write in C# - database, file management, networking etc. In my opinion, C# is better choice for such tasks: it is both powerful and simple, has great support in IDE and produces clear and readable code.
2. Native C++ is used for everything which is not supported by .NET - interface with hardware devices. Also, some legacy code is written in C++.
3. C++/CLI - used as bridge between C# and native C++. I think that writing GUI in C++/CLI is not convenient. It is enough to create Windows Forms application in C# and C++/CLI, and read code produced by Wizard, to see that C# is much better for this purpose. The main power of C++/CLI is interoperability, which allows to mix unmanaged and managed code in the same project, and this is exactly the place of C++/CLI in my project.

I beleive that using these three languages I get the better features from managed and unmanaged worlds.





Re: Visual C++ General Which One(Managed C++ or Native C++)

NeederOfVBHelp

I agree with alex, if at all possible use C# for gui, ect. using any form of C++ to make a GUI when you have C# avalable is like walking up a mountain when you could just take a bus, CLI is a great bridge between native C++ and C#



Re: Visual C++ General Which One(Managed C++ or Native C++)

TPECI

Thank you all.I will do so.





Re: Visual C++ General Which One(Managed C++ or Native C++)

TPECI

Hi, Can you introduce me some good books about visual c++.net, i don't want one which goes to simple part.
Thank you.





Re: Visual C++ General Which One(Managed C++ or Native C++)

valikac

Core c++! On the other hand, your choice is dependent on software plan and time you want to spend coding. In both cases though I think Windows offers the API for media and communications both managed and core.

valikac




Re: Visual C++ General Which One(Managed C++ or Native C++)

Alex Farber

I didn't read any C++/CLI book, just learned it using MSDN and CodeProject articles. I know that there is new C++/CLI book:
http://www.manning.com/sivakumar/
I didn't read it, but I read Nish's other book and many articles, and can guess that it is good.

The best sample which contains C# - C++/CLI - C++ code is this:
http://msdn.microsoft.com/msdnmag/issues/06/04/managedspy/

Actually, after learning this sample I decided to use this mixed program structure.





Re: Visual C++ General Which One(Managed C++ or Native C++)

Han Qiao

Hi Alex,

So far i'm developing networking program with GUI using C#, and at the end find out that i need to use native C++ for writing GINA. Now i'm worried that i might need to re-develop the whole things using native C++. But after seeing this thread, i feel a lot more relieve. However i still do not really understand how to combine my current C# project with incoming native C++ project.

Can you enlighten me more about how to design my project with combination of these 2 languages

Thanks in advance.