1 / 21

Programming Language C++

Programming Language C++. Extension of C. Dan Ophir, Ph.D. Cell.: 052-551359 e-Mail: comp_ophir@yahoo.com. Electrical Engineering. Requirements. Tests: Intermediate, Final. 66% Lectures + 33% Exercises. Note = Tests + Exercises. Exercises in diskettes 1. . rtf format (Office);

masons
Download Presentation

Programming Language C++

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming Language C++ Extension of C Dan Ophir, Ph.D. Cell.: 052-551359 e-Mail: comp_ophir@yahoo.com Electrical Engineering

  2. Requirements • Tests: • Intermediate, • Final. 66% Lectures + 33% Exercises Note = Tests + Exercises Exercises in diskettes 1. .rtf format (Office); 2. .c, .cpp, .h, .hpp source 3. dsp, .exe 4. .zip Assistance: Mr. Roman Yavich Rom778@ua.fm cell.: 052-399539

  3. Students

  4. Exercise 1 exercise1.doc

  5. Conventions • blue – link • red – a reserved word. • > - pressing on a menu, sub-menu, button

  6. C++ Object Oriented Programming Language

  7. Syllabus C++ Environment – User Interface: Visual C++ מחלקות ,(classes) מבני נתונים : מחסניות, תורים, רשימות מקושרות, עצים וערימות. שיטות חיפוש ומיון נתונים. תכנות מונחה עצמים ;(Object Oriented) תחביר של שפת .C++ עקרונות של תכנות מונחה עצמים: כמוס ,(Encapsulation) רב צורתיות (Polymorphism) (Inheritance).

  8. Bibliography • C++ Pocket book, Conor Sexton, Newnes (1996), • How to ProgramC, C++ and Java, Deitel & Deitel, Prentice Hall, 2000; • MSDN – Microsoft Design Network; • The C Programming Language; Brian W. Kerighean Dennis M. Ritchie Murray; Hill 1988; • http://www.cprogramming.com/tutorial.html • Object Oriented Programming , C++ושפת, אמיר קירש, Taskil Systems Ltd., 2001; • "שפת C++ כשפת אם", גרובר, "הוד עמי";

  9. Work environment Work- Space Files Desktop Windows H:\Shomron\myCPP\hello\hello.dsw

  10. Microsoft Visual C++

  11. C++ Workspace/Project Open B A C File>New>Workspace File>New>Project D (console) Close File>Save Workspace Save All Close Workspace

  12. C++ Source A File>Open Workspace C File>New B D File>Open

  13. C++ Compilation/Execution File>Open Workspace>Compile Build Execute (!)

  14. C++ Help (MSDN) help for

  15. C++ Debug

  16. Operators

  17. Variables • Naming rules: • letters, digits, _ • Not case sensitive • Starting with a letter

  18. Keywords (C, C++) C (32) auto break case char const continue default do double else enum extern float for goto if int long register return short signed sizeof static strict switch typede unsigned void volatile while C++ (11) class delete friend inline new operator private protected public template virtual

  19. Fibonnaci 1 1 2 3 5 8 13 21… Converges to the golden ratio. AB : CB = CB : AC A B C

  20. Golden Ratio Parthenon

  21. C Example #include <stdio.h> #include <conio.h> void main(void) // Fibionnaci { int a[20]; int i; a[0]=1; a[1]=1; for(i=2;i<20;i++) { a[i]=a[i-1]+a[i-2]; printf("Fibionnaci[%d]=%d \n",i,a[i]); } }

More Related