Your SlideShare is downloading. ×
0
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
MELJUN CORTES - C++ Programming
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

MELJUN CORTES - C++ Programming

110

Published on

MELJUN CORTES - C++ Programming

MELJUN CORTES - C++ Programming

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
110
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. C++ (programming language):
  • 2. What are some features,functions, or techniques thatprogrammers should avoid in C++?
  • 3. General Features of C++
  • 4. This is not necessarily a good thing
  • 5. For example, there is explicit pointer arithmetic (as in C)
  • 6. Some specific OO features of C++
  • 7. Classes can contain both data and operations
  • 8. Data and functions in classes can be hidden
  • 9. A class can be composed of other classes
  • 10. New classes can be obtained from other classes
  • 11. C++ allows all forms of polymorphism:
  • 12. coercion
  • 13. overloading
  • 14. pure polymorphism
  • 15. parametric polymorphism:templates, (genericity in Eiffel)
  • 16. Specific language features
  • 17. Comments
  • 18. Both C style comments /* ..... */ are allowed as well as comments starting with //
  • 19. Can use /* ...*/ for multiple line comments
  • 20. // can be used as in line comments
  • 21. long numTribbles; // will increase!
  • 22. They can also be used as single line comments
  • 23. // This is a comment
  • 24. // Every comment line must start
  • 25. // with a //
  • 26. /*
  • 27. // C++ comments can be contained
  • 28. // inside C style comments
  • 29. */
  • 30. Programming recommendation
  • 31. Always use // comments
  • 32. This allows sections of code tobe commented out with /* ... */
  • 33. Introduction to iostream
  • 34. Input and output are not part of the C++ language.
  • 35. They are supported by the iostream library.
  • 36. This predefines three streams for I/O:
  • 37. cin - standard input (terminal)
  • 38. cout - standard output (screen)
  • 39. cerr - standard error
  • 40. The << (put to) operatordirects output to a stream
  • 41. The >> (get from) operatorretrieves data from a stream
  • 42. A stream is a sequence of characters.
  • 43. Readability Advantages of C over C++
  • 44. According to : Carlos Oliveira
  • 45. of the perceived problems in C is the lack of support for object oriented features that are so common on the development of desktopapplications. For example, C lacks the concept of a typethat encapsulates code and data. While it is possible to program in an object oriented style in C, it is
  • 46. programmers. Inheritance was one of them, used to support object oriented features. Overriddenmethods were also added to improve object oriented programs.
  • 47. overloaded, so that manymath operations, and evenpunctuation such as “,” can be overloaded by programmers. Normal functions can also be overloaded, by providing versions that differ on the number and type of arguments.
  • 48. class based on one or more types. This allows for thecreation of containers, such as the ones found in the STL. Vectors, maps, and multimaps can all becreated by adding a type as a parameter for template instantiation
  • 49. Conclusion
  • 50. these features have a cost. It becomes increasinglydifficult to understand what is going on in each line ofcode, unless the developers are very disciplined.
  • 51. While C++ has some features that might be helpful, in general thebigger the C++ code base the harder it is to understand due to these issues.
  • 52. perform refactoring). In comparison, C is mucheasier to understand, andone can do a lot with tools such as ctags. It is not a surprise that large scaleprojects such as the Linux kernel use C without any problem.

×