[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-701213-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-701213-en":130,"doc-similar-701213":165},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","modern-c-for-computer-vision-lecture-2-c-basic-syntax","Modern C++ for Computer Vision - Lecture 2 - C++ Basic Syntax","","Lecture 2 introduces core C++ fundamentals for computer vision programmers, focusing on C++ basic syntax and the building blocks used to write, translate, and execute C++ code. It explains what C++ programs consist of, how keywords work, and how special characters are represented via escape sequences. The lecture covers entities, declarations versus definitions, function statements and semicolons, naming and scope rules, type categories, and variable concepts.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/modern-c-for-computer-vision-lecture-2-c-basic-syntax/701213/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/modern-c-for-computer-vision-lecture-2-c-basic-syntax/701213.png","ImageObject",300,407,{"name":42,"@type":43},"I feel Different","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-25","2026-11-12",true,{"@type":52,"interactionType":53,"userInteractionCount":33},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What is a C++ program and how does it become executable code?","Question",{"text":62,"@type":63},"A C++ program is a sequence of text files (typically header and source files) containing declarations. It is translated into an executable program and runs when the C++ implementation calls its main function.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"What are C++ keywords and how do they relate to identifiers?",{"text":67,"@type":63},"Certain words in a C++ program have special meaning and are called keywords. Other words can be used as identifiers, while comments are ignored during translation and certain characters require escape sequences.",{"name":69,"@type":60,"acceptedAnswer":70},"How do declarations, definitions, and scope work in C++?",{"text":71,"@type":63},"Declarations introduce entities, associate them with names, and define their properties; the declarations that define all required properties are definitions. Names are valid only within the scope introduced by their declarations, so using them outside that scope is an error.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},701213,1794524180,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":33,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":79,"read_time":144,"preview_page_count":96,"preview_urls":145},962093541761,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","Modern C ++ for Computer Vision  \nLecture 2: C ++ Basic Syntax  \nIgnacio Vizzo, Rodrigo Marcuzzi, Cyrill Stachniss  \nC ++, the legals  \nC++ Program  \n“A C++ program is a sequence of text files (typically header and source files) that contain declarations. They undergo translation to become an executable program, which is executed when the C++ implementation calls its main function.”  \nC++ Keywords  \n“Certain words in a C++ program have special meaning, and these are known as keywords. Others can be used as identifiers. Comments are ignored during translation. Certain characters in the program have to be represented with escape sequences.”  \n1 const , auto , friend , false , . . . ///\u003C C ++ Keywords 2 // comment type 1  \n3 /* comment type 2 */  \n4 /* comment type 3  \n5 BLOCK COMMENT  \n6 */  \n7 \" Hello C ++ \\ n \" ; ///\u003C \"\\ n \" is an escape character  \nC++ Entities  \n“The entities of a C++ program are values, objects, references, functions, enumerators, types, class members, templates, template specializations, namespaces. Preprocessor macros are not C++ entities.”  \n1 3 . 5f;  \n2 std :: string str1;  \n3 namespace std;  \n4 void MyFun c ();  \n5 con st int& a = b;  \n6 enum MyEnum {};  \n7 \\# define UGLY _MACRO (X)  \n// value entity  \n// object entity  \n// namespace entity // function entity // reference entity  \n// enum enityty // NOT a C ++ entity  \nC++ Declarations  \n“Declarations may introduce entities, associate them with names and define their properties. The declarations that define all properties required to use an entity are definitions.”  \n1 int foo; // introduce entity named \" foo \" 2  \n3 void MyFun c (); // introduce entity named \" MyFun c \" 4  \n5 // introduce entity named \" GreatFunction \"  \n6 // Also , this is a definition of \" GreatFunction \", 7 void GreatFunction () {  \n8 // do stuff 9 }  \nC++ Definitions  \n“Definitions of functions usually include sequences of statements, some of which include expressions, which specify the computations to be performed by the program.”  \n1 // Function Definition  \n2 void MyFunction () {  \n3 int a; // statement  \n4 int b; // statement  \n5 int c = a + b; // a + b i s an expression 6 }  \nNOTE: Every C++ statement ends with a semicolon “ ;”  \nC++ Names  \n“Names encountered in a program are associated with the declarations that introduced them. Each name is only valid within a part of the program called its scope.”  \n1 int my_ variable ; 2  \n3 {  \n4 float var _fl ; 5 }  \n6  \n7 var _fl ; 8  \n9 int var _fl ;  \n// \"my_ variable \" is the name //{\u003C-this defines a new scope // var _f is valid within this scope //}\u003C-this define s end of the scope // Error , var _fl outside its scope // Valid , var _fl not declared  \nC++ Types  \n“Each object, reference, function, expression in C++ is associated with a type, which may be fundamental, compound, or user-defined, complete or incomplete, etc.”  \n1 float a; // float is the fundamental type of a   \n2 boo l b; // boo l is fundamental   \n3  4 MyType c; // MyType is user defined , incomplete   \n5 MyType c{}; // MyType is user defined , complete   \n6  7 std :: vector ; // Also , user-defind type   \n8 std :: string ; // Also , user-defind type   \n C++ is a strongly typed language.  \nC++ Variables  \n“Declared objects and declared references are variables, exepct for non-static data members.”  \n1 int foo;  \n2 boo l know _ stuff ; 3  \n4 MyType my_var ;  \n5 MyType :: var;  \n[6](6 MyType . data_member)[ MyType . data_member](6 MyType . data_member) ;  \n// variable  \n// also , variable  \n// variable  \n// static data member , variable // non-static data member","cbCaiaXhY9bd4Gmp","https://ap.wps.com/l/cbCaiaXhY9bd4Gmp","pdf",779259,41,"English","# C++ Basic Syntax\n## C++ Programs and Legal/Translation Idea\n## C++ Keywords and Escape Sequences\n## C++ Entities\n## C++ Declarations\n## C++ Definitions and Function Bodies\n## C++ Names and Scope\n## C++ Types\n## C++ Variables","[{\"question\":\"What is a C++ program and how does it become executable code?\",\"answer\":\"A C++ program is a sequence of text files (typically header and source files) containing declarations. It is translated into an executable program and runs when the C++ implementation calls its main function.\"},{\"question\":\"What are C++ keywords and how do they relate to identifiers?\",\"answer\":\"Certain words in a C++ program have special meaning and are called keywords. Other words can be used as identifiers, while comments are ignored during translation and certain characters require escape sequences.\"},{\"question\":\"How do declarations, definitions, and scope work in C++?\",\"answer\":\"Declarations introduce entities, associate them with names, and define their properties; the declarations that define all required properties are definitions. Names are valid only within the scope introduced by their declarations, so using them outside that scope is an error.\"}]","Modern C++ for Computer Vision - Lecture 2 - C++ Basic Syntax | PDF",103,[146,150,153,157,161],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/77c03be40278226fd96193011aad4bec.webp",983,736,{"page_no":26,"url":151,"width":152,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/41000c5794475dd3b4db1680597dee9a.webp",982,{"page_no":30,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/91255f98b4b51012b4a791cdfee8ef4e.webp",981,735,{"page_no":33,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/1d8d8c8f8de732522908c8d15b4c662e.webp",980,734,{"page_no":96,"url":162,"width":163,"height":164},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/2e78eb051b8b0ee288b01cefa7e60c63.webp",979,733,{"list":166,"token":11},[167,173,179,185,192,199,205,211,217,223],{"doc_id":168,"doc_title":169,"file_type":137,"home_preview_img_url":170,"slug":171,"view_count":115,"category_name":29,"create_tm":172},692234,"PYTHON-QUICK GUIDE - Beginner - Start Here","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230003011241/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=yB074dXtFhOUO6zvc2Z01ITtuK4%3D","python-quick-guide-beginner-start-here",1794186385,{"doc_id":174,"doc_title":175,"file_type":137,"home_preview_img_url":176,"slug":177,"view_count":33,"category_name":29,"create_tm":178},685675,"C++ summary - basic commands, data types, input/output, and control statements","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000175952/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=%2FZ%2BxBaIAnccA%2BtEwyPc7qSv5u80%3D","c-summary-basic-commands-data-types-inputoutput-and-control-statements",1794016558,{"doc_id":180,"doc_title":181,"file_type":137,"home_preview_img_url":182,"slug":183,"view_count":22,"category_name":29,"create_tm":184},760749,"JavaScript for Impatient Programmers","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044250531/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=jbyYH8R6eTJDQ3kLfoS8T8UE%2FgQ%3D","javascript-for-impatient-programmers",1795908973,{"doc_id":186,"doc_title":187,"file_type":137,"home_preview_img_url":188,"slug":189,"view_count":190,"category_name":29,"create_tm":191},417793,"Python Programming Basics - Overview of Interpreters, Translation, and Key Vocabulary","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229921866711/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=UuOr3CY6zSPv4uLlij54vChcamA%3D","python-programming-basics-overview-of-interpreters-translation-and-key-vocabulary",13,1790610644,{"doc_id":193,"doc_title":194,"file_type":137,"home_preview_img_url":195,"slug":196,"view_count":197,"category_name":29,"create_tm":198},137735,"The Java Language Specification - Java SE 8 Edition - Final Release","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229863392130/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=IsT3%2FP1wX1trJxGbhpBwSgYDKnM%3D","the-java-language-specification-java-se-8-edition-final-release",23,1787439727,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":101,"category_name":29,"create_tm":204},699464,"Basic CSS - Lecture 4 - CSS Styling Fundamentals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010042266/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=8NSxiPH2GSPijgEC62uPA3Jcllw%3D","basic-css-lecture-4-css-styling-fundamentals",1794468368,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":33,"category_name":29,"create_tm":210},697965,"Arrays Made Easy - An Introduction to Arrays and Array Processing - SUGI 30 Tutorials","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010146275/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=e%2B2Rj0ooYULjPznCLtR0SMlvt4g%3D","arrays-made-easy-an-introduction-to-arrays-and-array-processing-sugi-30-tutorials",1794446535,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":22,"category_name":29,"create_tm":216},760089,"CS6 Practical System Skills - Fall 2019 - More on Git and Rebasing","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044495432/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=WtcEUxOaHsegmsKi4jiUZfdtAZY%3D","cs6-practical-system-skills-fall-2019-more-on-git-and-rebasing",1795898470,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":96,"category_name":29,"create_tm":222},698003,"md4r - R package Markdown parser using the MD4C library","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010155849/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=joHTqYmqG3CApCJXjL8zK4mPVwg%3D","md4r-r-package-markdown-parser-using-the-md4c-library",1794446945,{"doc_id":224,"doc_title":225,"file_type":137,"home_preview_img_url":226,"slug":227,"view_count":228,"category_name":29,"create_tm":229},347398,"PROGRAMMING IN “C” - MCA 101 - Lecture Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229911501616/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=lVTnnMEsv9nzFMv%2FD1G3sKHj0T0%3D","programming-in-c-mca-101-lecture-notes",34,1790066783]