Guru3D.com Forums

Go Back   Guru3D.com Forums > General > Programming/Html
Programming/Html C++,Visual Basic,HTML,Flash,OpenGL,Modelling,Java.



Reply
 
Thread Tools Display Modes
Which one to start C++ or C#?
Old
  (#1)
Mohsin hadi
Newbie
 
Videocard: EVGA Nvidia GTX560ti 448c
Processor: Intel core i5 2400
Mainboard: Asus P8H61-mle
Memory: 4gb DDR3
Soundcard: built in
PSU: Coolermaster 650watts
Default Which one to start C++ or C#? - 04-22-2012, 19:08 | posts: 9 | Location: Sadiqabad,Pakistan

Hello.
I want to ask about programming language.
I m a begner in programming and i m bit confused from where to start,some people said that for c# you have to learn C++ first,is it true?
Is it possible to to learn c# without learning C++?
Which one is widely used in windows apps and game designing etc.
I want you to guide me through the right path,where to go and how to.
Thnakx.
   
Reply With Quote
 
Old
  (#2)
proliferazor
Master Guru
 
proliferazor's Avatar
 
Videocard: AMD 7950
Processor: i7 930
Mainboard:
Memory: 12GB DDR3 1600
Soundcard:
PSU: 1KW
Default 04-23-2012, 00:48 | posts: 684

Quote:
Originally Posted by Mohsin hadi View Post
Hello.
I want to ask about programming language.
I m a begner in programming and i m bit confused from where to start,
Thnakx.
Check my List at the bottom.


Quote:
Originally Posted by Mohsin hadi View Post
Hello.
people said that for c# you have to learn C++ first,is it true?
No, however c# is easier to learn, but c++ is lower level means you can have greater control over your code, but requires more work, it is also faster.

Quote:
Originally Posted by Mohsin hadi View Post
Is it possible to to learn c# without learning C++?
Yes. In fact I would recommend learning C# first. Then c++. You do not have to, I just think it would be easier.

Quote:
Originally Posted by Mohsin hadi View Post
Which one is widely used in windows apps and game designing etc.
Most AAA games are written in c++ and/or c. It is however easier to write windows style apps with C# and .net ( and simple games with XNA ). Unless you use a API like GUI QT with c++.

If you want to make game engines then c++ is what you want to learn.

Quote:
Originally Posted by Mohsin hadi View Post
I want you to guide me through the right path,where to go and how to.
If you really are serious about this, you will need to read a lot. And write a lot of code. If you go the c++/directx or c++/openGL route then I recommend you first learn the older fixed function pipeline first, and get comfortable with it and 3D math, before trying to tackle shaders. As always ractice practice .....

Here are some books I recommend for c++

-Beginner
Beginning C++ through Game Programming http://www.amazon.com/Beginning-C-Th...5137422&sr=8-1

Beginning Game Programming 3rd ed (intro to directx) http://www.amazon.com/Beginning-Game...5137920&sr=1-1

-Advanced
Game Coding Complete 4th ed ( really good book on making game engines ) http://www.amazon.com/Game-Coding-Co...5137625&sr=8-1


-Advance How to write highly readable, easily maintainable, quality code
Code Complete 2 ed (this book is ****ing awesome) http://www.amazon.com/Code-Complete-...5137512&sr=8-1


However your best option right now, IMO is joining 3Dbuzz, they have just started doing live c++ classes, you get to ask questions, they assign homework (optional) and there is a test at the end of each course. It isn't free but it's not expensive at all either. Read about it here.
http://www.3dbuzz.com/vbforum/showth...?192196&ref=21

You can watch the first c++ class for free here
http://downloads.3dbuzz.com/Cpp_Class_1_4_13_12.rar

Last edited by proliferazor; 04-23-2012 at 01:04.
   
Reply With Quote
Old
  (#3)
Mohsin hadi
Newbie
 
Videocard: EVGA Nvidia GTX560ti 448c
Processor: Intel core i5 2400
Mainboard: Asus P8H61-mle
Memory: 4gb DDR3
Soundcard: built in
PSU: Coolermaster 650watts
Default 04-23-2012, 17:22 | posts: 9 | Location: Sadiqabad,Pakistan

Thanx alot dear...your information is much helpful and i m already downloaded the first class from 3Dbuzz,but brother here in Pakistan its not easy for us to buy the online books and to attend online lectures,is there any tutorials are available at you tube or any other place?
And i meanly want to join the windows apps and game designing.
   
Reply With Quote
Old
  (#4)
Mohsin hadi
Newbie
 
Videocard: EVGA Nvidia GTX560ti 448c
Processor: Intel core i5 2400
Mainboard: Asus P8H61-mle
Memory: 4gb DDR3
Soundcard: built in
PSU: Coolermaster 650watts
Default 04-23-2012, 17:24 | posts: 9 | Location: Sadiqabad,Pakistan

Its not possible for me to buy a book from online retailer...we have so many problems here in Pakistan.sorry for my poor English.
   
Reply With Quote
 
Old
  (#5)
proliferazor
Master Guru
 
proliferazor's Avatar
 
Videocard: AMD 7950
Processor: i7 930
Mainboard:
Memory: 12GB DDR3 1600
Soundcard:
PSU: 1KW
Default 04-23-2012, 19:51 | posts: 684

You do not have to attend the 3dBuzz classes live you can always watch them by streaming after they do the live class.

With out books you will have a harder time but not impossible.

There are lots of websites to help you.

http://www.cplusplus.com/doc/tutorial/
http://www.cplusplus.com/reference/

http://msdn.microsoft.com/en-us/vstudio/hh386302

http://www.codeproject.com/KB/cpp/

http://stackoverflow.com/questions/tagged/c%2b%2b

http://www.gamedev.net/forum/31-for-beginners/

That should get you started, and don't forget, google is your BEST FRIEND use it to find any thing you need.

Free windows IDE
http://www.microsoft.com/visualstudi...al-cpp-express
   
Reply With Quote
Old
  (#6)
allesclar
Ancient Guru
 
allesclar's Avatar
 
Videocard: Nvidia GeForce GT 540M
Processor: Intel Core i7 2670QM
Mainboard: Samsung BA92-07584A
Memory: Corsair 16GB DDR3 1333MHz
Soundcard: Onboard
PSU: N/A
Default 05-04-2012, 08:42 | posts: 5,324 | Location: England

C++ is the best starting one.
   
Reply With Quote
Old
  (#7)
kabusuti
Newbie
 
Videocard: ATI Radeon
Processor: Intel Core TwoDuo
Mainboard:
Memory:
Soundcard:
PSU: Internal
Default 11-01-2014, 05:29 | posts: 11

Everything is possible, but if you know CC+ then you will be able to learn quickly any language which based on it.
   
Reply With Quote
Old
  (#8)
thatguy91
Ancient Guru
 
Videocard: XFX RX 480 RS 4 GB
Processor: Ryzen 1700X
Mainboard: MSI X370Gaming Pro Carbon
Memory: DDR3-3733@3333 C15 16 GB
Soundcard: Onboard ALC1220 Nahimic 2
PSU: Enermax Platimax 750W
Default 11-01-2014, 06:19 | posts: 6,420 | Location: Australia

C++ has different versions, with C++14 being the latest. It's a little different programming that original C++, but is probably better to look in to looking forward.
   
Reply With Quote
Old
  (#9)
mbk1969
Ancient Guru
 
mbk1969's Avatar
 
Videocard: GeForce GTX 970
Processor: I7-4930
Mainboard: Asus p9x79
Memory: G Skill RipjawZ, 16GB
Soundcard: Onboard + FiiO E17
PSU: 1000 W
Default 11-01-2014, 10:33 | posts: 3,496 | Location: Moscow, Russia

Quote:
Originally Posted by allesclar View Post
C++ is the best starting one.
Why? Imo, C++ has confusing syntax sometimes and overwhelming multiple inheritance and poor template implementation, but its strength points - pointer arithmetic, uncontrollable type casting - are for professionals only. C# has much more better generic types implementation and type casting control.

Back 20 years ago Pascal was the best language to start the study of programming.

Edit: Another weak places of C++ are include-files and macros. They can turn programmer`s life to hell.

Last edited by mbk1969; 11-01-2014 at 10:37.
   
Reply With Quote
Old
  (#10)
mbk1969
Ancient Guru
 
mbk1969's Avatar
 
Videocard: GeForce GTX 970
Processor: I7-4930
Mainboard: Asus p9x79
Memory: G Skill RipjawZ, 16GB
Soundcard: Onboard + FiiO E17
PSU: 1000 W
Default 11-01-2014, 10:40 | posts: 3,496 | Location: Moscow, Russia

To the OP - if you will decide to install free VisualStudio and start to learn C++ you better install VisualAssist plugin so that it will help you with intelli-sence a lot.

http://www.wholetomato.com

Obviously you can find cracked bundle.
   
Reply With Quote
Old
  (#11)
haz_mat
Master Guru
 
Videocard: 1070 FE
Processor: 3770K @ 4.5 1.3v + H110
Mainboard: Gigabyte Z77X-D3H rev1.1
Memory: 2x8GB Mushkin 1866 CL9 1T
Soundcard: Sound Blaster Z + ATH-M50
PSU: Seasonic 750w
Default 11-01-2014, 12:51 | posts: 244 | Location: Crestline, California

I recommend Stroustrup's books on C++, there are ones for beginners and experts. All straight from the creator of the standard as well. You can easily find them for "free."

You might also consider Java as a beginning language. It has a c-like syntax but you don't have to worry about pointers or managing your dynamically allocated memory. Once you get the basics on procedural programming and how objects and methods work, then you'll probably be ready to tackle dynamic allocation, constructors/destructors, pointer math, overloading, and other fun stuff.
   
Reply With Quote
Old
  (#12)
Glidefan
Don Booze
 
Glidefan's Avatar
 
Videocard: GTX 1070 | 8600M GS
Processor: i7 6700 | C2D T5550
Mainboard: MSI Z170A
Memory: 16GB| 4096MB
Soundcard: SB Z | ALC 888
PSU: Aurora 600w | 90w AC
Default 11-03-2014, 13:46 | posts: 12,303 | Location: Solar System, Earth, Med, Cyprus

I'll say something and i may come out a bit as if i'm throwing you a wrench here.
If you are a total beginner with programming, why not trying a bit of Python or Visual Basic?
Only to get the whole mentality of programming, not to use those languages to make anything.
Don't shoot me now, i'm just telling this as at college they took us through a bit of Visual Basic and then Assembly and C/C++.
(Not that i remember anything from them anymore...)
   
Reply With Quote
Old
  (#13)
haz_mat
Master Guru
 
Videocard: 1070 FE
Processor: 3770K @ 4.5 1.3v + H110
Mainboard: Gigabyte Z77X-D3H rev1.1
Memory: 2x8GB Mushkin 1866 CL9 1T
Soundcard: Sound Blaster Z + ATH-M50
PSU: Seasonic 750w
Default 11-04-2014, 09:58 | posts: 244 | Location: Crestline, California

Quote:
Originally Posted by Glidefan View Post
I'll say something and i may come out a bit as if i'm throwing you a wrench here.
If you are a total beginner with programming, why not trying a bit of Python or Visual Basic?
Only to get the whole mentality of programming, not to use those languages to make anything.
Don't shoot me now, i'm just telling this as at college they took us through a bit of Visual Basic and then Assembly and C/C++.
(Not that i remember anything from them anymore...)
Thats not bad advice at all. Python goes without question as being one of the easiest to learn but still fast, flexible, and widely used. VB is also commonly used outside education, there are plenty of commercially-deployed softwares written in VB. Also, getting to know VB and the .NET stuff makes the transition to C# much smoother later on.
   
Reply With Quote
Old
  (#14)
Glidefan
Don Booze
 
Glidefan's Avatar
 
Videocard: GTX 1070 | 8600M GS
Processor: i7 6700 | C2D T5550
Mainboard: MSI Z170A
Memory: 16GB| 4096MB
Soundcard: SB Z | ALC 888
PSU: Aurora 600w | 90w AC
Default 11-04-2014, 10:49 | posts: 12,303 | Location: Solar System, Earth, Med, Cyprus

It's just that if someone told me that back then I might have said "Just give me C++, i don't want to learn something that i won't be using in the end."
While it's just a way to ease someone in, to get the hang of how how to think and then commit to a language. I see people in Unity's forums saying "I want to take this and move it over there. How?"
That's shows that perhaps the poster doesn't want to program.
The solution is dead easy if you have the mentality. It's just "take the coordinates of the object, add to it till it's there."
   
Reply With Quote
Old
  (#15)
SpecChum
Master Guru
 
SpecChum's Avatar
 
Videocard: Unlocked Fury - Acer XR34
Processor: AMD Ryzen 1700 @ 3.9Ghz
Mainboard: ASUS Crosshair VI Hero
Memory: 16Gb G.Skill 3200C14 RGB
Soundcard: ROG SupremeFX->HP200
PSU: EVGA SuperNova G2 850W
Default 11-07-2014, 10:54 | posts: 595 | Location: Doncaster, England

I miss programming, well sometimes lol

Not coded "professionally" for over 10 years and not coded at all for over 5. This was about the last time I did anything constructive.

Anyway, I've got my old DirectX 3D engine on disk (from 2002-2003!) and it uses a custom maths library (handwritten by yours truly using discrete x87 and SSE code paths) and fixed pipeline if you want that? Does have very primitive support for HW T&L and shaders tho. Oh, and MD2 models. Is far from finished tho.

If you, or anyone else for that matter, wants it just send me your email address and and fire it over. You're free to do whatever you want with it.

EDIT: forgot to say it's written in C++/asm

Last edited by SpecChum; 11-07-2014 at 11:20.
   
Reply With Quote
Old
  (#16)
Glidefan
Don Booze
 
Glidefan's Avatar
 
Videocard: GTX 1070 | 8600M GS
Processor: i7 6700 | C2D T5550
Mainboard: MSI Z170A
Memory: 16GB| 4096MB
Soundcard: SB Z | ALC 888
PSU: Aurora 600w | 90w AC
Default 11-11-2014, 12:16 | posts: 12,303 | Location: Solar System, Earth, Med, Cyprus

Quote:
Originally Posted by SpecChum View Post
I miss programming, well sometimes lol

Not coded "professionally" for over 10 years and not coded at all for over 5. This was about the last time I did anything constructive.

Anyway, I've got my old DirectX 3D engine on disk (from 2002-2003!) and it uses a custom maths library (handwritten by yours truly using discrete x87 and SSE code paths) and fixed pipeline if you want that? Does have very primitive support for HW T&L and shaders tho. Oh, and MD2 models. Is far from finished tho.

If you, or anyone else for that matter, wants it just send me your email address and and fire it over. You're free to do whatever you want with it.

EDIT: forgot to say it's written in C++/asm
And where were you when i wanted to start making stuff 10 years ago?
   
Reply With Quote
Old
  (#17)
SpecChum
Master Guru
 
SpecChum's Avatar
 
Videocard: Unlocked Fury - Acer XR34
Processor: AMD Ryzen 1700 @ 3.9Ghz
Mainboard: ASUS Crosshair VI Hero
Memory: 16Gb G.Skill 3200C14 RGB
Soundcard: ROG SupremeFX->HP200
PSU: EVGA SuperNova G2 850W
Default 11-11-2014, 15:34 | posts: 595 | Location: Doncaster, England

Quote:
Originally Posted by Glidefan View Post
And where were you when i wanted to start making stuff 10 years ago?
Oops
   
Reply With Quote
Old
  (#18)
SpecChum
Master Guru
 
SpecChum's Avatar
 
Videocard: Unlocked Fury - Acer XR34
Processor: AMD Ryzen 1700 @ 3.9Ghz
Mainboard: ASUS Crosshair VI Hero
Memory: 16Gb G.Skill 3200C14 RGB
Soundcard: ROG SupremeFX->HP200
PSU: EVGA SuperNova G2 850W
Default 11-11-2014, 15:43 | posts: 595 | Location: Doncaster, England

I dare say you know much more than I do nowadays tho.

I do read a lot and keep up with the newer tech advancement but never put it into practice anymore.
   
Reply With Quote
Old
  (#19)
CJ3D
Maha Guru
 
CJ3D's Avatar
 
Videocard: Asus GTX970 4GB
Processor: Haswell Core i7 4770K
Mainboard: Intel board (Haswell)
Memory: 8GB DDR3
Soundcard: Onboard Realtek
PSU: XFX XTR 650w (SeaSonic)
Default 01-20-2015, 13:25 | posts: 2,388 | Location: Yes

I started with QBASIC, then c/c++, then Java, then C#

Out of all four I completely recommend C#, no pointers and addressing, no worrying about freeing resources manually (thanks to C# garbage collection), much more modern, cleaner and more polished, hides a lot of the dirt work but stays powerful, Microsoft did a brilliant job designing C# in my opinion. Java comes close but I much prefer C#.

Sure c++ is better for performance orientated apps such as games and video codecs etc.., but for normal apps you can't go wrong with C#.
If C# is missing certain API functionality, just PInvoke the c++ dll. Easy...

I can't stand c++ anymore, so much extra work for no apparent reason. I refuse to code in it if possible.
Plus coding in C# takes way less time than a c++ app. I'm talking 2-3 days instead of 2-3 weeks.
   
Reply With Quote
Old
  (#20)
mbk1969
Ancient Guru
 
mbk1969's Avatar
 
Videocard: GeForce GTX 970
Processor: I7-4930
Mainboard: Asus p9x79
Memory: G Skill RipjawZ, 16GB
Soundcard: Onboard + FiiO E17
PSU: 1000 W
Default 01-20-2015, 14:13 | posts: 3,496 | Location: Moscow, Russia

CJ3D, completely agree. Plus I can write short tool on C# and give source-file for users to compile it on their computers since csc.exe is distributed with .Net framework.
Plus even if I give tool in byte-code there is chance that it will be compiled at runtime with much more optimizations than statically compiled C++ code. I mean .Net JIT-compiler has more information about platform and can apply more aggressive optimizations than C++ compiler.

Last edited by mbk1969; 01-20-2015 at 14:17.
   
Reply With Quote
Old
  (#21)
CJ3D
Maha Guru
 
CJ3D's Avatar
 
Videocard: Asus GTX970 4GB
Processor: Haswell Core i7 4770K
Mainboard: Intel board (Haswell)
Memory: 8GB DDR3
Soundcard: Onboard Realtek
PSU: XFX XTR 650w (SeaSonic)
Default 01-21-2015, 11:40 | posts: 2,388 | Location: Yes

Agreed mbk1969, more good points there.

Another thing I forgot to mentions is there are no header files, I recall spending hours trying to fix annoying header problems in c++. Not fun at all.

With C# you can basically download source code/projects from the web and compile it with confidence. 95% of downloaded projects just compile and ran (a few projects had fixed file paths pointing to files on the authors PC). You would be lucky to do that with c++ projects.
   
Reply With Quote
Old
  (#22)
Tat3
Ancient Guru
 
Tat3's Avatar
 
Videocard: HIS R9 380 4gb
Processor: Intel 6700K
Mainboard: MSI Z170A M5
Memory: HyperX 4*4gb 2666Mhz
Soundcard: UA-55
PSU: Seasonic G650
Default 01-21-2015, 20:11 | posts: 11,487 | Location: Finland

Why would someone recommend skipping C/C++ and going stright to C#/Java ? Sure it's easier and you get things done faster, but without knowing how things really work. No pointers and addresses ? There are, you just wont see those, same with memory allocation and clearing, you just wont see it.
Related article: http://www.joelonsoftware.com/articl...000000319.html

It's good to know how things work on ground level, in the end, somewhere under C#/Java program there is C/C++ code running at some point. C/C++/C++0x will not go away. Also porting C++ application to other platform is likely easier (Embercadero CPP Builder) than porting C# app to multiple platforms.
   
Reply With Quote
Old
  (#23)
mbk1969
Ancient Guru
 
mbk1969's Avatar
 
Videocard: GeForce GTX 970
Processor: I7-4930
Mainboard: Asus p9x79
Memory: G Skill RipjawZ, 16GB
Soundcard: Onboard + FiiO E17
PSU: 1000 W
Default 01-21-2015, 22:48 | posts: 3,496 | Location: Moscow, Russia

On ground level is assembler. It is cool and worth to know but absolutely not necessary. Same with C++ - it is necessary for system programming but it is not for education and for application programming. I used to develop on C/C++ since 1991 (and on assembler too). But the last five years on C# are like breath of fresh air, like conversation with a pleasant companion.
Btw, at those years Pascal was considered as best language for educational purpose.

Last edited by mbk1969; 01-21-2015 at 22:50.
   
Reply With Quote
Old
  (#24)
CJ3D
Maha Guru
 
CJ3D's Avatar
 
Videocard: Asus GTX970 4GB
Processor: Haswell Core i7 4770K
Mainboard: Intel board (Haswell)
Memory: 8GB DDR3
Soundcard: Onboard Realtek
PSU: XFX XTR 650w (SeaSonic)
Default 01-22-2015, 14:25 | posts: 2,388 | Location: Yes

Quote:
Originally Posted by Tat3 View Post
Why would someone recommend skipping C/C++ and going stright to C#/Java ? Sure it's easier and you get things done faster, but without knowing how things really work. No pointers and addresses ? There are, you just wont see those, same with memory allocation and clearing, you just wont see it.
Related article: http://www.joelonsoftware.com/articl...000000319.html

It's good to know how things work on ground level, in the end, somewhere under C#/Java program there is C/C++ code running at some point. C/C++/C++0x will not go away. Also porting C++ application to other platform is likely easier (Embercadero CPP Builder) than porting C# app to multiple platforms.
I see your point but c++ is a bit ancient.

I guess it comes down to what apps you decide on creating.
For general apps, you dont need to worry about c++ at all, c# is very powerful and hides a lot of the repetitive low level stuff in the background.
If a DLL you need is in c++, you can simply PInvode the DLL in c# code.

Think of assembly code, why code in pure machine code when C can do it for you?
Same with c#. Why code in c++ when c# does it all for you in the background?

If you plan on developing professional 3D games or performance critical things such as a media codec, you should start with C/C++ or even assembly.

If you plan on creating general apps (file editors, business apps, utilities), c# is the way to go.
Most times you don't need to refer back to c++ code, c# has huge support and plenty of libraries available.
Chances are if the code you need exists in c++, there is a c# or VB.NET alternative available. Just as powerful, less complex, way faster development time, way less lines of code.
   
Reply With Quote
Old
  (#25)
CJ3D
Maha Guru
 
CJ3D's Avatar
 
Videocard: Asus GTX970 4GB
Processor: Haswell Core i7 4770K
Mainboard: Intel board (Haswell)
Memory: 8GB DDR3
Soundcard: Onboard Realtek
PSU: XFX XTR 650w (SeaSonic)
Default 01-22-2015, 14:28 | posts: 2,388 | Location: Yes

Quote:
Originally Posted by mbk1969 View Post
On ground level is assembler. It is cool and worth to know but absolutely not necessary. Same with C++ - it is necessary for system programming but it is not for education and for application programming. I used to develop on C/C++ since 1991 (and on assembler too). But the last five years on C# are like breath of fresh air, like conversation with a pleasant companion.
Btw, at those years Pascal was considered as best language for educational purpose.
"breath of fresh air"... so true.
I love programming in c#, clean, powerful, simple, fast.
I honestly hate programming in c++ now, messy, unsafe, low level repetitive nonsense.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com
Copyright (c) 2017, All Rights Reserved. The Guru of 3D, the Hardware Guru, and 3D Guru are trademarks owned by Hilbert Hagedoorn.