Sinisterly
Learning C with Psycho_Coder | Part:1 - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: C, C++, & Obj-C (https://sinister.ly/Forum-C-C-Obj-C)
+--- Thread: Learning C with Psycho_Coder | Part:1 (/Thread-Learning-C-with-Psycho-Coder-Part-1)

Pages: 1 2 3 4 5 6 7 8


RE: Learning C with Psycho_Coder | Part:1 - ArkPhaze - 06-06-2013

What are your intentions with a language like C or C++? I would start with this question. What are you wanting to create?


RE: Learning C with Psycho_Coder | Part:1 - Psycho_Coder - 06-06-2013

(06-06-2013, 08:20 AM)Ex094 Wrote: @Psycho_Coder Well can you tell me what's the difference between C and C++? I am confused which one should I choose

EDIT: Well in my knowledge C++ is an Advance form of C which enables users to do some hight level stuff that one can't do in C, Is that right?

Yes I agree with what Sir @ArkPhaze said. Would you please tell me what kind of application do you need for which you wanna learn C++. However I will tell you the differences.

C++ is a superset of C. C++ can run most of C code while C cannot run C++ code.

[table]
[row]
[cell] Differences between C and C++[/cell]
[/row]
[/table]
[table]
[row]
[cell] C[/cell]
[cell] C++[/cell]
[/row]
[row]
[cell]C follows the procedural programming paradigm[/cell]
[cell] C++ is a multi-paradigm language(procedural as well as object oriented) [/cell]
[/row]
[row]
[cell]In C the data is not secured [/cell]
[cell]the data is secured(hidden) in C++.This difference is due to OOP features like Data Hiding which are not present in C. [/cell]
[/row]
[row]
[cell]C uses the top-down approach [/cell]
[cell]C++ uses the bottom-up approach( the base elements are first formulated which then are linked together) [/cell]
[/row]
[row]
[cell]C is function-driven [/cell]
[cell]C++ is object-driven [/cell]
[/row]
[row]
[cell] Structures cannot contain functions in C.[/cell]
[cell] Functions can be used inside a structure[/cell]
[/row]
[row]
[cell]C does not support Exception Handling [/cell]
[cell]C++ supports Exception Handling [/cell]
[/row]
[row]
[cell]C does not have NAMESPACE[/cell]
[cell]C++ supports Exception Handling [/cell]
[/row]
[row]
[cell]C is a Middle-level Language [/cell]
[cell]C++ is a High-Level Language [/cell]
[/row]
[/table]

*Note there are a lot of debates regarding the last difference


RE: Learning C with Psycho_Coder | Part:1 - Ex094 - 06-06-2013

@ArkPhaze @Psycho_Coder I am having lots of ideas in my mind, not sure how to explain or present them but the thing is I want to learn C++ to an extent from where I can build GUI Programs, Database type etc normal applications. I don't want to get too far because I want to learn the basics first then proceed slowly to the hard parts. Add a little game development too Biggrin


RE: Learning C with Psycho_Coder | Part:1 - Psycho_Coder - 06-06-2013

(06-06-2013, 12:12 PM)Ex094 Wrote: @ArkPhaze @Psycho_Coder I am having lots of ideas in my mind, not sure how to explain or present them but the thing is I want to learn C++ to an extent from where I can build GUI Programs, Database type etc normal applications. I don't want to get too far because I want to learn the basics first then proceed slowly to the hard parts. Add a little game development too Biggrin

In that case I would recommend you to learn C first cover the basics, file handling and specially pointers and this would pave your way for C++. Then start learning C++ and you will find it very easy as you already have a basics of C. After getting the concepts of programming and semantics of C++ learn Win32 programming with C++. For game development if you learn C++ then you can install DarkGDK and start making games :tongue:

Why don't you learn VB.NET for GUI as it is relatively easy to learn and gain good concepts.


RE: Learning C with Psycho_Coder | Part:1 - Ex094 - 06-06-2013

@Psycho_Coder If I liked VB.NET then I would have done it in the first place instead of Python and also I'm not a Windows user Tongue. I don't know if you know Alex Allain (Author of Jumping into C++ and owner of a good C++ resource site ) I've read his C++ articles and I've bought his book, He says that if you want to learn C or C++, do C++ first and he recommended it strongly. He also mentioned not doing C before ain't a big deal.


RE: Learning C with Psycho_Coder | Part:1 - Psycho_Coder - 06-06-2013

(06-06-2013, 01:40 PM)Ex094 Wrote: @Psycho_Coder If I liked VB.NET then I would have done it in the first place instead of Python and also I'm not a Windows user Tongue. I don't know if you know Alex Allain (Author of Jumping into C++ and owner of a good C++ resource site ) I've read his C++ articles and I've bought his book, He says that if you want to learn C or C++, do C++ first and he recommended it strongly. He also mentioned not doing C before ain't a big deal.

Yes I know him very well :tongue: he is the owner of cprogramming.com . For learning C++, C is not a necessary prerequisite but it is better to learn C as it will leave you with less work when you learn C++.

"Jumping into C++", I will not recommend this book instead have a look at the following :- http://www.2shared.com/document/o5uiSB06/Robert_Lafore_-_Object_Oriente.html

The book by Alex is good and I have it too(pdf version though) but I like the above book far more and I believe that this book will leave you with very good concepts (Download the pdf from the link I gave).

Thank you,
Sincerely,
Psycho_Coder


RE: Learning C with Psycho_Coder | Part:1 - ArkPhaze - 06-06-2013

If you are up for programming GUI's in C++ then you'll need to know about message loops in Windows for Win32 GUI's. It's much more complicated than using C# or VB.net. So if you don't have any GUI programming experience then it might be overwhelming.

Also, there used to be very similarities between C & C++ (much more so back then, than today), but that was maybe years ago. Personally as time went on, I believe features implemented in C and C++ made these languages more separate from each other. I wouldn't quite call C++ and advanced version of C, or the opposite for this reason. Especially since C++11. C has variable length arrays and durable array members in which C++ does not have,however C++ has lambdas, static types, smart pointers, exceptions, reference types, etc... If you wanted to write a procedural program then you may consider C instead of C++ though. C++ began as a language which took principles from C originally, but nowadays I wouldn't consider it an extension of C. If you merged these languages together, there would be conflicts with differences that exist. C has less static type safety than C++, the modulo operator is not required to behave identical when handling a (-) denominator, and sizeof 'x' is 1 in C++, whereas it would be 4 in C:

C++ -> n == 1
Code:
int n = sizeof 'x'

C -> n == 4
Code:
int n = sizeof 'x'



RE: Learning C with Psycho_Coder | Part:1 - Deque - 06-07-2013

@Ex094:
Just my 2 cents: You can use MonoDevelop for .NET coding in Linux.
I know this is not what you want, but being a Linux user doesn't hinder you coding in C# or VB.NET.


RE: Learning C with Psycho_Coder | Part:1 - Ex094 - 06-07-2013

@Deque What is you opinion if I do C#? As Arkphaze says GUI programming might be painful (I won't worry about that but still). My programming won't be restricted to GUI programming only!


RE: Learning C with Psycho_Coder | Part:1 - Psycho_Coder - 06-07-2013

(06-07-2013, 01:01 PM)Ex094 Wrote: @Deque What is you opinion if I do C#? As Arkphaze says GUI programming might be painful (I won't worry about that but still). My programming won't be restricted to GUI programming only!

If you really don't bother much about GUI then go for C#