C++ vs C#

11/02/2009 10:26 _Shuriken_#1
Da mir AutoIT zu lahm wird, möchte ich umsteigen auf etwas größeres und habe 2 Möglichkeiten: C++ & C#

SuFu ergab nichts.
11/02/2009 11:51 leridan#2
....ich empfehle c++ ;)
11/02/2009 13:13 Shadowz75#3
Pro C#:

* garbage collection
* array bounds checking
* huge .NET-Framework library
* types have a defined size (e.g. a long is 64Bit)
* strings are encoded in UTF/16
* autoboxing - every type can be treated as if it inherits from object
* supports constructor-chaining (one constructor can call another constructor from the same class)
* when a virtual method is called in a constructor, the method in the most derived class is used
* static constructors (run before the first instance of the class is created)
* exceptions have access to a stack trace
* advanced runtime type information and reflection
* supports variadic functions nicely
* built-in support for threads
* no need for header files and #includes
* no fall-through on switch-statements
* arithmetic operations can be checked for overflow if required
* objects must have a definite value before being used
* attributes can be attached to classes and retrieved at runtime
* no forward declarations required, classes can be arranged at will
* access to class members / functions is done only by the dot (no more -> or ::)
* conditional functions (e.g. for debugging)
* structs and classes are actually different (structs are value types, have no default constructor in general cannot be derived from)
* supports properties
* readonly members are const, but can be changed in the constructor
* finally block for exceptions
* arrays are objects
* support for anonymous functions
* supports the base keyword for calling the overridden base class

Pro C++

* better performance
* portability
* multiple inheritance
* deterministic destruction (allows RAII)
* any type can be thrown as exception (only classes derived from System.Exception in C#)
* ability to enforce const-correctness
* implicit interfaces on generics (in C#, generics must be constrained with an interface)
* offers pointers (C# only offers pointers in unsafe mode)
* support for macros
* support for global variables, functions, constants
* allows default arguments on function parameters
* STL
* supports bitfields

[Only registered and activated users can see links. Click Here To Register...]

I prefer C#, because of the .Net Framework library
11/02/2009 18:28 TrueYami#4
^

Totaly agree.
11/02/2009 18:58 Gianotti#5
ich finde beide sprachen gut doch benutzen tue ich beide für andere dinge :

c++ benutze ich nur für hacks ( detours,writeprocessmemory/read etc ). c# benutze ich um Programme zu schreiben ( client und server anwendungen etc )

( hacks sind auch progs ist schon klar )

c# ist nicht so fehleranfällig wie c++. jeder anfänger sollte mit c# anfangen . ist um einiges einfacher ( subjektive meinung )
11/02/2009 19:54 MrSm!th#6
c++
11/03/2009 00:57 Fish*#7
c++ more advanced
C# more common
11/03/2009 10:31 _Shuriken_#8
Es gibt wohl keine Einigkeit wies ausschaut.
Wahrscheinlich werd ich erstmal in C# reinschnuppern^^, dann seh ich weiter.
11/03/2009 12:13 bloodx#9
c++ = musst du dein Hirn mehr anstregen
c# = kansnt du chilla machen..


:D
11/03/2009 12:18 Gianotti#10
Quote:
Originally Posted by bloodx View Post
c++ = musst du dein Hirn mehr anstregen
c# = kansnt du chilla machen..


:D
/agree so ists wirklich XD
11/03/2009 19:38 seraph1n#11
Quote:
Originally Posted by bloodx View Post
c++ = musst du dein Hirn mehr anstregen
c# = kansnt du chilla machen..


:D
war das jetzt pro-c#? sonst kannste auch gleich brainfuck lernen @ts.
11/03/2009 21:11 bloodx#12
c++ > c#

kommt aber drauf an was du später damit amchen willst :/
11/04/2009 16:15 backo#13
Quote:
Originally Posted by bloodx View Post
c++ > c#

kommt aber drauf an was du später damit amchen willst :/
Programmiersprachen sind keine Fußbäller. Die eine ist nicht besser als die andere, wie du schon angedeutet hast, use the right tool, for the right job. Ein Programmierer entscheidet sich nie zwischen 2 Sprachen, er lernt einfach beide.
11/04/2009 18:50 _Shuriken_#14
Angenommen, man kann beide Sprachen perfekt, kennt jeden Befehl in- und Auswendig und man scheißt auf die Komfortablität beim Programmieren, so würde C++ um einiges mehr bringen, oder? (wenn man alles programmieren können will, vom einfachen Text ausgeben über ein eigenes Videoprogramm bis zu Hacks und noch schwierigeren Sachen.)
11/04/2009 21:09 MrSm!th#15
Quote:
Originally Posted by Pflyffser View Post
Angenommen, man kann beide Sprachen perfekt, kennt jeden Befehl in- und Auswendig und man scheißt auf die Komfortablität beim Programmieren, so würde C++ um einiges mehr bringen, oder? (wenn man alles programmieren können will, vom einfachen Text ausgeben über ein eigenes Videoprogramm bis zu Hacks und noch schwierigeren Sachen.)
:rolleyes: du gehst hier von einer Situation aus, die NIEMALS bei NIEMANDEM möglich sein wird!
Aber generell ist C++ universell, egal ob man alles kann oder nicht!
Ich sags so: Solange man weiß, wo man Namen der Funktionen herkriegt (Google) und wo man nachschlägt, wie man sie anwendet (im Falle Windows MSDN), dann kommt man gut zurecht!
Und C++ kann auch sehr komfortabel sein, wofür gibts Libs?
Insgesammt ist C# nur zu empfehlen wenn du auf Crossover scheißt.