473,395 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How To Learn C And C++ Code Easily

please give me reply [code]
Oct 5 '08 #1
9 7559
Start reading books.. there are no easy ways as such...

Start reading this book.
Bjarne Stroustrup - The C++ Programming Language, 3rd Edition (Addison Wesley)

As and when you proceed, keep writing small programs
Oct 6 '08 #2
that all depends on ur interest. start doing practice in different style you will get it very soon..
Oct 6 '08 #3
Tassos Souris
152 100+
I suggest starting with the C Programming Language and then diving into C++.

I say this because C++ heavily depends on C and you must have a particurarly very good knowledge of C in order to understand C++, especially when it comes on pointers.

Now, you might say that books for C++ explain all that stuff so why not start from C++?? Well, that is not true...
Books about C++, focus on its Object-Oriented Nature and just scratch on the surface subjects related to C, such as pointers. On a C++ book, you will learn how to do Object-Oriended progamming, how to do polymorphism and that stuff.. you'll learn the STL, but not the C-related stuff... this will be a serious problem!!!!!!

After all, knowing C is very beneficial for you cause many subjects depend on C. Unix for example is written in C.

Now, if someone say that: "Don't Learn C!!!! Learn C++ because C++ is Object Oriented and C is not!!!!"
Then just say them they are wrong!!!!!
Object Oriented programmig is a technique and can be done with many languages, including C. For exmple, Linux is written in C using Object-Oriented techniques. You can program in a Object-Oriented style using the C language; just search google.
I use C in an object oriented style; the techniques i use were developed by Axel-Tobias Schreiner who has a free e-book with his techniques; search for "Object Oriented Programming with ANSI-C" in google.

So, i recommend starting with C. Master it!!! and then learn C++ and master it too!!
Oct 6 '08 #4
Banfa
9,065 Expert Mod 8TB
I say this because C++ heavily depends on C and you must have a particurarly very good knowledge of C in order to understand C++, especially when it comes on pointers.
I would say that C and C++ have a lot in common syntactically, however they tend to have little in common when you look at the approach used to design a program using those languages.

If you want to learn to write good object orientated programs using C++ then you may actually be better off skipping C and the bad (procedural) programming habits you will learn and jumping straight into C++.
Oct 6 '08 #5
Tassos Souris
152 100+
I would say that C and C++ have a lot in common syntactically, however they tend to have little in common when you look at the approach used to design a program using those languages.

If you want to learn to write good object orientated programs using C++ then you may actually be better off skipping C and the bad (procedural) programming habits you will learn and jumping straight into C++.
I disagree here...
Object Oriented design is the same regadless of the language you use.. You can make OO designs in C and in C++ that are exactly the same.. only the coding differs.

Do not forget that the point is not how to translate your OO design in C++ using the classes and the related stuff... The problem is how to do the OO design itself. To learn this you must learn how to recognize objects, do modeling and the rest you know.. To map your OO design in a language is not diffucult.. I do this in C as i said.

In my opinion, the point is not to learn how to do OO in C++. The point is how to do OO in general (and of course understand the difference between Object-Oriented programming and Meta-programming which is very important specially with the rise of Web).

Then when the time comes in choosing the language, using powerful (not obscure) features of the language makes a better quality system from another that uses only common features. Using pointers effectively is surely an asset to any programmer. It can help solve complex problems elegantly. A C++ book (most of them) will not teach you that. So, you will not understand what a pointer is. Of course if a book teaches you that (as far as i know only the book from the creator of the C++ language does that) then there is not problem! Pointers are very powerful. Polymorphism in C is accomplished with pointers to functions and etc. See how kernels use pointers to read from different file systems. Pointers are the power of C and C++. Object-Oriented programming is not a power of C++. Is a power for the programmer. True to be said, Java when it comes to OO design is better than C++, because it includes interfaces and hides the stuff better than C++ does.... not to say that C++ is ugly!

However, i AGREE with you in one point. If you start programming in C and you are not familiar with Object-Oriented Programming. Then, yes you will have a slight problem adjusting your mind to OO thinking. But, if you are already familiar to OO (maybe you have programmed in Java before) then you can learn C and program in an Object-Oriented style. Linux is written that way.

That's my opinion of course.

With respect,

Tassos Souris
Oct 6 '08 #6
i dont want to hijack this thread as his question is on how to learn c and C++ easily.

I dont want to argue with the above two posters at all, since i feel both are correct in one way or the other.
Since i dont know any back ground about you, whether you have any programming knowledge or not, its difficult to suggest something.

My earlier suggestion was based on my assumption that you will be having some basic understanding of programing :(

If you are looking forward to learn programming, take a long breath and read and understand about languages, programming, principles, concepts etc. Then you wont be needing any of our advices on choosing what you want to learn.
Once you finalize what you want to do, whether to learn C or learn C++, we can help you out in terms of referring you to which books to be read or how to learn it.

i dont feel its bad to start with c++ and then understanding C, because once you understand any of the above languages, rest will be very easy for you. I wouldnt have told this, if you were opting between j2me and .net.

came across some interesting comments though :)
Oct 6 '08 #7
myusernotyours
188 100+

came across some interesting comments though :)
Yah... Very interesting. From where I am looking I don't think reinventing the wheel is a good idea.

Regards,

Alex.
Oct 8 '08 #8
Tassos Souris
152 100+
Yah... Very interesting. From where I am looking I don't think reinventing the wheel is a good idea.

Regards,

Alex.
Does this refer to that i use C with OO techniques rather than a OO language like C++ and Java?
Oct 8 '08 #9
donbock
2,426 Expert 2GB
please give me reply [code]
It would help to know your background. Is this your first programming language? What other programming languages do you know?

It would help to know your ambition. Do you seek to make your living writing software? Do you have a strong preference between learning procedural (C) or object-oriented (C++) programs. Do you just need to get through a particular class? Do you just need to solve one problem and then never write code again?

If this would be your first programming language and your ambitions are modest, then you might be well-served by starting with a procedural interpretive language like perl. That lets you focus on the writing-a-program task without being too distracted by the mechanics of how to tell the computer to execute your program. Perl lets you get away with a level of sloppiness inappropriate for a professional programmer, so don't linger there too long.

If you know you want to do object-oriented programming then a procedural language might teach you bad habits. Either jump into the deep end with C++ or try to find an object-oriented interpretive language to start with. O-O isn't my specialty, but I have a vague recollection that Ruby might fit that bill.

If your goal is to make your living writing software then learning a programming language is just the first step. You also need to learn software engineering topics like configuration management, fundamentals of good design, design for maintainability, design for extensibility, design for testability. You should also learn more programming languages: a carpenter carries more than one tool.
Oct 8 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: Rob | last post by:
i know javascript, vbscript, asp css and alot more and im only 14 i was wondering which is easier to learn php or cgi. any help?
42
by: Bicho Verde | last post by:
I have now free time and money to do what I want :-) I have some basic skills in programming (C, Pascal, Macromedia Actionscript) but don't know exactly what to do in the world of programming. And...
55
by: Elijah | last post by:
I have read many of the topics on learning C++ or Java first. It seems like everyone says something different. I would like to know if I should learn C++ or Java. First a little about myself. I...
30
by: Rhino | last post by:
I am giving some thought to applying for some jobs that want people with Java and C++ experience. I have been writing Java for several years and am fluent enough that I don't have to get help with...
65
by: Chris Carlen | last post by:
Hi: From what I've read of OOP, I don't get it. I have also found some articles profoundly critical of OOP. I tend to relate to these articles. However, those articles were no more objective...
7
Banfa
by: Banfa | last post by:
Posted by Ganon11 So, you want to learn how to program! Good for you! Programming is a very intruiging and fun activity to pick up, and it's also a great career choice if you like it! Finally,...
4
by: Mike | last post by:
Hello everyone! I've been programming for several years doing web sites, web services, controls, etc. using VB6, VB.NET, C#, ASP, JavaScript and XML, well I'm bored with creating web sites and...
6
by: ryanbayona | last post by:
I really wanted to learn C++ thats why i took the initiative to self- study. I am currently following the tutorial at this site: http://www.cprogramming.com/tutorial.html#c++tutorial but im...
83
by: liketofindoutwhy | last post by:
I am learning more and more Prototype and Script.aculo.us and got the Bungee book... and wonder if I should get some books on jQuery (jQuery in Action, and Learning jQuery) and start learning about...
59
by: BigRelax | last post by:
Hello`` I am a student from chinese. I like C. -- Message posted using http://www.talkaboutprogramming.com/group/comp.lang.c/ More information at http://www.talkaboutprogramming.com/faq.html
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.