Hi, im VERY confused about this, and i get a lot of different explanaitions, so now im asking you guys, because you properly know:)

What can .net be used for? what is it good for? .net vs. gtkmm?

Can i use the .net framework with c++? and how?

Thanks in advance

> Can I use .NET with C++ ?
>> Yes, you can if you're working with Microsoft Visual C++ (2008) it should be easy to do so ...
>> Edit:: This link might be useful for you ...

.NET is a framework that can be used from many different languages (C#, C++, VB.NET, Python, etc.). It can be used for just about anything, web development, desktop applications, mobile phone apps, etc.

All right:) thanks guys, any tuts or advice about how to go around it? ive been googling "c++.net tut", "Visual c++ tut", ".net framework tut" etc. all day and no useable results :/

Some say C# is easier to use with the .net net framework, is that true?

Some say C# is easier to use with the .net net framework, is that true?

I think that it's only a matter of preference ...

>What can .net be used for? what is it good for?
In my opinion .NET is best used for applications and services where the overhead of the framework is acceptable. I can't stress enough how much more pleasant GUI applications are to write in .NET than in Win32 or MFC. It can be used for a lot of things, and that list is growing steadily.

>.net vs. gtkmm?
.NET is much bigger than just a graphics library, so I'd say Windows Forms vs. gtkmm would be more appropriate. And I'd also say (my personal opinion) that the design of Windows Forms is superior and easier to use. Then again, I'm not a GUI programmer by any means, so easier is a huge benefit for me.

>Can i use the .net framework with c++? and how?
Yes, you just need the .NET framework and a compiler that recognizes C++/CLI. Be prepared to supplement your C++ knowledge with apparently redundant (but different) features, because C++/CLI is C++ with a bunch of extra features for supporting .NET.

>ive been googling "c++.net tut", "Visual c++ tut", ".net framework tut" etc. all day
Search for "C++/CLI", that's the official name of the new language. Also note that C++ and C++/CLI are two different languages as C++/CLI adds non-standard features to incorporate the .NET framework.

>Some say C# is easier to use with the .net net framework, is that true?
Yes. I can say without hesitation that C++/CLI is messier and more complicated than C# when it comes to straight .NET work. This is both obvious and logical when you consider that C# was designed along with .NET and they're so tightly coupled that one should expect the whole thing to be clean and easy to use. On the other hand, C++ existed long before .NET, so the language had to be sodomized into supporting the framework. The result is surprisingly good, but still far more awkward than C#.

commented: Very nice explanation ! :) +1

Wow, thanks, that cleared out a lot!

the thing is, i would like to continue with as few changes as possible for now, so i guess ill try out the more awkward C++/CLI.
im properbly going to need a new compiler?
(i think the one i use now is called GNU GCC?)

I use the code::blocks IDE.

Any tuts you can recommend?

Wow, thanks, that cleared out a lot!

the thing is, i would like to continue with as few changes as possible for now, so i guess ill try out the more awkward C++/CLI.
im properbly going to need a new compiler?
(i think the one i use now is called GNU GCC?)

I use the code::blocks IDE.

Any tuts you can recommend?

If you're using GCC I'm assuming you aren't using Windows. If that's the case, you will probably need to use Mono, in which case this link will probably be helpful: http://mono-project.com/CPlusPlus

I understand you are trying to minimize changes, but from someone that uses C++ often, if I were to write code for .NET, I would use C#. I don't know your specific situation, but it just makes a lot more sense to me.

.NET is probably working best if you're using a Microsoft compiler together with other MS related stuff, if you really want to develop for .NET I would like to recommend you to use their stuff ...

>im properbly going to need a new compiler?
>(i think the one i use now is called GNU GCC?)
Yes, GCC doesn't support C++/CLI at all. The only C++/CLI compiler I'm aware of is the one used natively by Visual C++ (2005+).

>If that's the case, you will probably need to use Mono
If that's the case then his decision is made. Mono does not have a C++/CLI compiler.

Im confused now, i am using windows?

I just checked the settings in m IDE and i proberbly missunderstood, sorry:), on their website they say:
# Multiple compiler support:

* GCC (MingW / GNU GCC)
* MSVC++
* Digital Mars
* Borland C++ 5.5
* Open Watcom
* ...and more
So could be MingW?

>i am using windows?
You should know.

>So could be MingW?
MinGW is a port of GCC to Windows. Unless you made explicit changes to Code::Blocks settings to use a different compiler, you're using MinGW. However, regardless, you would be better off downloading Visual C++ 2008 Express as it supports not only the compiler for C++/CLI, but also a visual designer for GUIs tailored to .NET.

>If that's the case, you will probably need to use Mono
If that's the case then his decision is made. Mono does not have a C++/CLI compiler.

Right, hence my link to http://mono-project.com/CPlusPlus, where this is clearly stated, and support of C#.

Unless there's some compelling influence otherwise, C# would be my preference for .NET development. Others may disagree.

.NET is probably working best if you're using a Microsoft compiler together with other MS related stuff, if you really want to develop for .NET I would like to recommend you to use their stuff ...

If they insist on C++ and/or only want to target Windows, this makes sense but I would otherwise disagree. Mono works quite well. I use programs using Mono everyday on Linux. Many people don't like this but it doesn't much bother me.

Narue: i know im using windows;)

So, as i understand it: i should change to Visual C++ no matter if i decide to do C++/CLI or C#?

This decission is quite a dilemma for me :)

UPDATE:

Huge turn-off in Visual C++

I tried this VERY simple code in visual c++

#include <iostream>

using namespace std;

int main()
{
    cout << "hej lars" << endl;
    return 0;
}

And it couldn't even compile??

I believe this should work. Perhaps you should read through these to get started: http://msdn.microsoft.com/en-us/library/ms235630.aspx

I would recommend you give both C++ and C# a chance if you are in a dilemma. I just feel C# is a much more natural choice for .NET development.

UPDATE:

Huge turn-off in Visual C++

I tried this VERY simple code in visual c++

#include <iostream>

using namespace std;

int main()
{
    cout << "hej lars" << endl;
    return 0;
}

And it couldn't even compile??

Yes, I imagine using your tools in a clueless way is quite a turn-off. Your code compiles just fine for me, on four versions of Visual C++ reaching back over a decade: 6.0, 2003, 2005, and 2008. Do you really think that a compiler would fail to compile the hello world program and everybody except you missed it for eleven years? Quite frankly, I don't think highly enough of you or poorly enough of the rest of the world to even entertain that possibility.

I'm more inclined to believe that you did something silly, like created a Windows application project when you wanted a console project. In other words, PEBKAC.

Wow Narue, you are getting les and less friendly for every post aren't you?

It wouldn't be the first time code working perfeclty for others didn't for me (ie. the winAPI). now, i have no doubt that you are a good programmer etc. and by far superior to me, but showing a little humanity would suit you, everybody fails now and then okay?

Adam 1122: thank you very much :) That linkpretty much explained. ill be sure to try out both C++ with .net and C#
but phew! Visual C++ is freaking confusing compared to the IDE ive used for c++ previously !

^^ i apressiate your answers Narue, i just got a bit upset by your last post ;)

>Wow Narue, you are getting les and less friendly for every post aren't you?
I'm the nicest person in the world compared to my earlier posts on Daniweb.

>everybody fails now and then okay?
I have no problem with people failing. I do it regularly myself. But the way you phrased your post was "I did everything perfectly. This compiler is broken and nobody should use it".

I see what you mean, thats not how i meant it however.
I believe this sort of misunderstandings is mostly due to the use of different languages, english is not my native language (obviously), so what i write may occur slightly different from what i mean, im sorry if i offended anybody. if i did it was not intent.
Now i think i can mark this thread as solved, thank you very much everybody. this cleared out a lot. i will try out visual c++ (and visual studio?) though i must admit i find it quite confusing as an IDE:)

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.