Some questions

Hello, i want to ask you some questions.

Where can i code something with c++ ? i mean, practical usage, for learning.
Something like plugins for games (for example minecraft) but in c++

Is c++ good for unity ? or is there something like unity just for c++ ?

If i want to learn c# after c++, will it be easy ? what is more difficult c# or c++ ?

Thank you for your respond
This site has many great examples and plenty of wonderful members who are awesome programmers. We can help you with questions too.
Every platform has support for c++, some are native some not. Native platforms have full support while others have limited support for c++. But i can assure you, you wont be thinking about portability most probably, because you will use a framework that ports your c++ code.(Qt, etc.)

By unity if you mean the game engine Unity3D. No, Unity3D doesn't support c++. There is Unreal Engine like Unity3D, but UE4 is far more better at every aspect except it is harder to learn. I used both engines.

Any other language is easier than c++, because c++ is the most diffucult to learn modern programming language. So yes c# is easier to start programming. But here is a quote, "If you can program in C++, you can program in any programming language"
A guy who hates c++ said it, here is the link
http://simpleprogrammer.com/2012/12/01/why-c-is-not-back/

EDIT : If you want to write plugin for MineCraft, you need to find its engine first, and how much engine supports plugins. Also you need to use functions provided by its engine. Have fun
Last edited on
@Ceset: Right on!
^^
Last edited on
To answer you well (on top of what Ceset already said), you would have to take into consideration the advantages and disadvantages of C++/C#.

C++:
C++ will probably always be used as long as we use silicon-based computers. It is very robust, literally any system can support it (depending on the quality of the compilers), but this doesn't mean that one can easily port it (unless the program only uses pre-made cross-platform libraries like OpenGL). Also, by the very nature of what C++ is, it is the fasted language to use for run-time (though the difference in speed between C++ and C# is getting closer...but it will probably never cross).

C#:
Due to the fact that C# runs through an abstraction layer (a "virtual machine"), it doesn't run as close to the hardware as C++ does. However, it is much faster to produce the end result and, like Java, you don't have to worry about having to port it on the most part -- the abstraction layer (that you don't really deal with production-wise) does that for you.
I should point out that C# is no longer Windows-Only.
In fact, Microsoft has been making quite a few good decisions since Satya Nadella became CEO, but that's beside the point.

So which should you learn? If you are only to learn one, as a game programmer I would say "C++." However, if you are going to be working on more business-oriented programs, I would probably say C#.
HOWEVER, you should definitely learn both if you can. C# is a great choice if you need to get something done fast and you are not at all worried about the small performance drop. If you are working on something that requires as much power as possible (like a game, or driver) then C++ would be the language of choice.

NOTE: This is just talking about C++ x C#. There are many other languages out there that each have their own uses. That is something that you should try researching a bit more on your own. One last thing: As Ceset quoted -
If you can program in C++, you can program in any programming language

With that in mind, if you are going to dedicate yourself to just one language (which, in all honesty, is a bad idea), then C++ should be the one. At least, for now.

EDIT:
After reading through the link that Ceset posted, I would personally have to disagree with him on the post part. The part that I do agree with (as you can see) is that C# is easier -- and thus faster -- to develop with than C++.
Managed languages like C# has a LOT of benefits. I'm not saying that C++ is flat out the best language to learn. I'm just saying that I disagree with the "C++ is a sinking ship and should be left behind" idea.
...though, this is coming from a game developer, not a business software developer (and yes, I do know that C# is used in parts of the game industry).

And in C++'s defense, the only reason why C++ still has so much deprecated back-end stuff is because companies still use the deprecated stuff. Here is a link to the BigThink channel where Bjarne Stroustrup mentions why it is so bloated:
https://youtu.be/JBjjnqG0BP8?t=4m28s
I put it to where he mentions it. With that in mind, I would say it is a good thing that C++ hasn't cleaned out the old stuff.
Last edited on
@rlc4: If Ceset said that "C++ is a sinking ship and should be left behind" I didn't see it (I'm old). I also disagree with that statement.

I've been a programmer since 1986 and a c++ programmer since 1991. I have learned several other languages, C# being one of them. I say, if you can only learn one language, then learn C++. IMHO, it is the best, hands down!
@koothkeeper;
I apologize for any miscommunication. I was not saying that Ceset said that. Everything in my EDIT was referring to the person that wrote the blog that Ceset linked to. He didn't exactly say that, but the way that the blog writer talked about C++, that is what it sounded like (at least to me).
AGAIN: I am NOT saying Ceset said any of that. I am saying the BLOG WRITER said that.

Also, your "disagreement" agrees with what I was saying. I was just saying that C++ is overall the best, and it won't be beaten any time soon. You probably misunderstood me here because I mentioned that though C++ is "the best, hands down," C# does have its advantages...especially if you just need to get something small done quickly.
Thanks for your replies.
I really appreciate it :)
And, is it ok, to learn c++ and c# both at once ?
Won't i be confused ?
Choose one learn it, use it for a while then learn other languages.

I like c++, and i feel home when i use it. So no, i don't think c++ is a sinking ship. But that guy in the link dislikes c++ a lot.
Last edited on
My apologies to all where I misread your intentions -- I tend to not read for comprehension when I'm tired. I'm glad that everyone of you has an open mind and a desire to learn.

Sincerely,

Kooth
I know, it happens to me sometimes too, so yes i am not even angry. Just wanted to correct it.
Ceset is very much correct on the matter. Whatever language you are wanting to learn, devote entirely to that one until you feel like you are comfortable with it, then learn the next.

As Stroustrup (Creator of C++) said -- roughly --
You can not really consider yourself a professional programmer if you only know one language

Source (The 5 Programming Languages You Need to Know): https://youtu.be/NvWTnIoQZj4

In my humble opinion, in complete contradiction to what the blog writer believes, I personally believe that C++ should be the first language that every computer programmer should know.

Some would go farther and say that 'C' should be the first language, because almost every modern language commonly used is a descendant of C. Though, C itself is not widely used with the exception of very low-level operations.
I completely agree rlc4. I believe if anyone wants to actually be able to learn programming properly I believe they should start with C++ as it doesn't have any of the needless abstraction of languages like python and is less complicated to start learning that languages like Java that force OOP on you from the start. I believe the fact that so many high school students are being taught python as their first language is blatant condescension by teachers and examiners who believe that all teenagers are stupid and don't want to learn and should instead be taught a language which can do hello world in a single line, but who's lack of structure causes most programs to be a disorientating unstructured mess. This instead of teaching people a programming language which can do anything and is the fastest there is (with the exception of the occasional slight loss to C) so that their programs are not hamstrung from the moment they are conceived. It also gives people no concept of how their programs actually work as teaching someone their first language as a dynamically typed language leads people (in my experience) to avoid the use of specific types of variables (almost no one I know ever utilises bools) and despite what the examiners will tell you, even my teacher finds it difficult to debug python where none of us who already knew programming and program in C++ have ever had a problem with it. I believe I can really sum up my problem with the current state of programming education when some of the people in my coding set (which is in a selective grammar school I should add) after about a week of trying to learn scratch and python asked our teacher "So how do I make Assassin's Creed?". Rant over.
Last edited on
@shadowmouse

I actually purposefully didn't take any programming classes in high school for that very reason. Instead, I decided to take art classes (weird for a programmer, but I did fairly well...and still am -- I'm in a Game Art program in my college at the moment) while continuing to self-teach myself programming (I have self-taught myself a variety of languages since my dad got me into it at the age of 7 -- a lot of my reading practice was actually from programming).

Because of that, some of my friends that wanted to just follow along within the class are just now starting to touch on the basics of C++ now that they are a year into their 2-year college degree; while I've already had almost a decade of experience with it. The ironic thing is that some of my friends say that I have a better understanding of C++ than their teachers (or, at least explain it to them better).
Last edited on
@shadowmouse
a programming language which can do anything and is the fastest there is (with the exception of the occasional slight loss to C)

AFAIK everything what is correct in C is also correct in C++, so C++ is indeed the fastest (excluding assembler and machine code, of course)! And C++ can also be faster than C, like with std::sort().
The only thing I was going off was that I'd been reading about it and I think C code compiled as C++ is the same speed, but when you start adding classes, it can start to slow down to a maximum of about 5% slower, so measurably but not noticably. So procedural C++ is the same speed, but OOP makes it ever so slightly slower (although in my opinion much much easier to program).
Yes, it makes it a heck lot easier. Have you ever seen winapi? They tried to make OOP in C. It's so terrible, but it works in C++!
Topic archived. No new replies allowed.