Is there a big diference between C+ & C#?

Started by Icey, Tue 09/08/2011 11:06:04

Previous topic - Next topic

Icey

I was able to get Visual Studio 2010. I wanted to make a small test game for my 360. What I notice was is that you have to code in C#. Problem is that is something I have never done before. I only coded in C+. Can someone let me know what is the difference? or is there a way I can make were I could use C+ coding instead of C#?

Babar

Before the barrage of flaming that is sure to ensue (and honestly, Icey, your post seems tailored exactly to be flamed :P), it's C++, not C+. And yeah, they are very different languages.

I'd suggest figuring out C#. It's a lot easier to use and get into than C++ for many people. If you've coded some in C++, you shouldn't have too much difficulty with C#. And yeah, you need C# for coding for you 360.
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

Khris

C# is much more similar to Java.

Hello world in C++:

Code: ags
#include <iostream>
 
int main()
{
   std::cout << "Hello, world!\n";
}


C#:
Code: ags
using System;
 
class Program
{
    static void Main()
    {
        Console.WriteLine("Hello world!");
    }
}


According to Wikipedia's XNA article:
QuoteGames that run on the framework can technically be written in any .NET-compliant language, but only C# in XNA Game Studio Express IDE and all versions of Visual Studio 2008 and 2010 (as of XNA 4.0)[3] are officially supported.

Calin Leafshade

C# is syntactically very similar to ags script and in my opinion it is a better language.

C++ is faster in the majority of cases but unless you really need that speed in a modern setting (high grade physic simulation or something) I can literally think of no good reason to use it with the exception of cross-platform compatibility.

C# takes most of the programming concepts from c++ and improves upon them.

While C# is often compared to java in style they are very different in execution and C# programs are *much* faster than java.

monkey0506

Who wants to bet $50 that "able to get Visual Studio 2010" means "downloaded via torrent" (or some other illegal means) and not "downloaded VS2010 Express which is actually free"?

It's also worth asking that while developing games with XNA might be all well and good, are you actually prepared to pay for a license to have them published over XBLA? Coz that is not free, and you can't just download a license from TPB. :=

C# is completely object-oriented which is very, very nice structurally (IMO), and the memory is also managed, which means no memory leaks in your programs. Compared to C++ there are a lot of differences in the implementation of things, but it's intuitive enough that it shouldn't take a reasonable person long at all to figure it out.

arj0n

Quote from: monkey_05_06 on Tue 09/08/2011 11:39:52
Who wants to bet $50 that "able to get Visual Studio 2010" means "downloaded via torrent" (or some other illegal means) and not "downloaded VS2010 Express which is actually free"?

It's also worth asking that while developing games with XNA might be all well and good, are you actually prepared to pay for a license to have them published over XBLA? Coz that is not free, and you can't just download a license from TPB. :=

C# is completely object-oriented which is very, very nice structurally (IMO), and the memory is also managed, which means no memory leaks in your programs. Compared to C++ there are a lot of differences in the implementation of things, but it's intuitive enough that it shouldn't take a reasonable person long at all to figure it out.
I bet he "got it by a friend (of a friend of a ...)".

monkey0506

Somewhere down the line a torrent was probably involved though...and either way that still falls under the category of "other illegal means". :P

arj0n

It was a disguised affirmation of your post Monkey  ;)

Ghost

#8
From the "Nerd Notebook":

Nerd1: "C++ is C with classes.  C# is C++ without the need to keep track of all that dynamic memory allocation."
Nerd2: "Duuude, it's not as simple as THAT!"
(cue fight)

C# is (as far as I'm concerned) quite easy to like if you're no die-hard C++ fan. It takes memory handling almost completely out of your hands, removes the somewhat beginner-unfriendly pointer syntax, and I think on most computers the speed issues mentioned won't pose a large problem. Lemmy converted me to C#, and I've not yet looked back...

XNA takes it another step further by simplifying asset management and giving you a solid framework. Not a perfect one, and you won't get superply shiny stuff automatically, but a solid base.

[edit]
Oh, yes. Stealing software is BAAAAD!

Wonkyth

Speaking of which, I really need to make my teacher get me a Microsoft IT Academy thingy...

On Topic: I moved directly from AGScript into C#, and have had so much fun with it I've not touched AGS in months.   :-X
"But with a ninja on your face, you live longer!"

Paper Carnival

C# is truly the greatest thing that ever happened to me.

I cannot hate Microsoft anymore after this.

It's not even just the dynamic memory allocation, there's a lot of things that come with it. It allows for amazing code design and abstraction among other things. And, if you are up to it, you can even have some manual control over memory allocation. I never actually tried it, so I don't know if you can overload the new and delete operators as well (as in C++).

Oh, and if you are familiar with the mono project, it IS cross-platform.

However, if you are serious about learning programming, I believe learning C++ is also essential. It helps you understand better how things work in the background and also lets you appreciate the magic of C# even more.

selmiak

don't you need to download some extra packages to even run a program that was written in C#?

Calin Leafshade


Wonkyth

Runtime Environments are hardly something to be worried about.
"But with a ninja on your face, you live longer!"

cat

Doesn't Windows 7 already ship with .NET framework included?

Wonkyth

As far as I know. Although it still can't quite be taken for granted. You'd be surprised just how many people have computers that they've been using for close on a decade without even connecting to the internet, let alone updating.
"But with a ninja on your face, you live longer!"

Wyz

The main difference is that that C# is shit and C++ is not.
Life is like an adventure without the pixel hunts.

Wonkyth

Here we have a C# hater. No, I'm not just calling him that, it's true. Innit, Wyz?
"But with a ninja on your face, you live longer!"

Calin Leafshade

.net 2.0 was shipped in XP SP3 i believe

and all versions since have shipped with .net 2.0 or greater.


Icey

Thanks for all the feed back. I think I might download the C# plug-in and play around with that.

And Monkey you would lose that bet because I did download the free one however it expired on me. So I did take my chance and look up a Keygen. I checked to see if it was bad before I download it.

Also I did buy a member ship before I even noticed I the the creator on my laptop. Microsoft has every thing sorted out weird on there site. This means I now have a years worth of time to make something for the 360 >.<

SMF spam blocked by CleanTalk