Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":14478,"date":"2015-05-06T21:39:54","date_gmt":"2015-05-07T02:39:54","guid":{"rendered":"https:\/\/mitzihernandez.withknown.com\/2015\/mastery23-tc1017"},"modified":"2015-05-06T21:39:54","modified_gmt":"2015-05-07T02:39:54","slug":"mastery23-tc1017-3","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2015\/2015\/mastery23-tc1017-3\/","title":{"rendered":"#mastery23 #TC1017"},"content":{"rendered":"
\n

#mastery<\/a>23 #TC<\/a>1017
<\/span><\/p>\n

Creation and use of vectors in C++<\/span><\/p>\n

Vector<\/em>\u00a0is a template class that is a perfect replacement for the good old C-style arrays. It allows the same natural syntax that is used with plain arrays but offers a series of services that free the\u00a0<\/span>C++ programmer<\/strong>\u00a0from taking care of the allocated memory and help operating consistently on the contained objects.<\/span>The first step using<\/span>\u00a0<\/span>vector<\/em>\u00a0<\/span>is to include the appropriate header:<\/span><\/p>\n

    \n
  1. #include<\/a><\/span> <\/vector><\/span><\/li>\n<\/ol>\n

    Note that the header file name does not have any extension; this is true for all of the Standard Library header files. The second thing to know is that all of the Standard Library lives in the namespace\u00a0std<\/em>. This means that you have to resolve the names by prepending\u00a0std::<\/em>\u00a0to them:<\/p>\n

      \n
    1. std<\/span>::<\/span>vector<\/span><\/int><\/span> v<\/span>;<\/span> \/\/ declares a vector of integers<\/span><\/span><\/li>\n<\/ol>\n

      For small projects, you can bring the entire namespace\u00a0std<\/em>\u00a0into scope by inserting a using directive on top of your\u00a0cpp<\/strong>\u00a0file:<\/p>\n

        \n
      1. #include<\/a><\/span> <\/vector><\/span><\/li>\n
      2. using<\/span> namespace<\/span> std<\/span>;<\/span><\/li>\n
      3. \/\/…<\/span><\/span><\/li>\n
      4. vector<\/span><\/int><\/span> v<\/span>;<\/span> \/\/ no need to prepend std:: any more<\/span><\/span><\/li>\n<\/ol>\n

        This is okay for small projects, as long as you write the using directive in your cpp file. Never write a using directive into a header file! This would bloat the entire namespace\u00a0std<\/em>\u00a0into each and every cpp file that includes that header. For larger projects, it is better to explicitly qualify every name accordingly. I am not a fan of such shortcuts. In this article, I will qualify each name accordingly. I will introduce some\u00a0typedef<\/em>s in the examples where appropriate\u2014for better readability.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

        \n

        #mastery<\/a>23 #TC<\/a>1017
        <\/span><\/p>\n

        Creation and use of vectors in C++<\/span><\/p>\n

        Vector<\/em> is a template class that is a perfect replacement for the good old C-style arrays. It allows the same natural syntax that is used with plain arrays but offers a series of services that free the <\/span>C++ programmer<\/strong> from taking care of the allocated memory and help operating consistently on the contained objects.<\/span>The first step using<\/span> <\/span>vector<\/em> <\/span>is to include the appropriate header:<\/span><\/p>\n

          \n
        1. #include<\/a><\/span> <\/span><\/li>\n<\/ol>\n

          Note that the header file name does not have any extension; this is true for all of the Standard Library header files. The second thing to know is that all of the Standard Library lives in the namespace std<\/em>. This means that you have to resolve the names by prepending std::<\/em> to them:<\/p>\n

            \n
          1. std<\/span>::<\/span>vector<\/span><\/span> v<\/span>;<\/span> \/\/ declares a vector of integers<\/span><\/span><\/li>\n<\/ol>\n

            For small projects, you can bring the entire namespace std<\/em> into scope by inserting a using directive on top of your cpp<\/strong> file:<\/p>\n

              \n
            1. #include<\/a><\/span> <\/span><\/li>\n
            2. using<\/span> namespace<\/span> std<\/span>;<\/span><\/li>\n
            3. \/\/…<\/span><\/span><\/li>\n
            4. vector<\/span><\/span> v<\/span>;<\/span> \/\/ no need to prepend std:: any more<\/span><\/span><\/li>\n<\/ol>\n

              This is okay for small projects, as long as you write the using directive in your cpp file. Never write a using directive into a header file! This would bloat the entire namespace std<\/em> into each and every cpp file that includes that header. For larger projects, it is better to explicitly qualify every name accordingly. I am not a fan of such shortcuts. In this article, I will qualify each name accordingly. I will introduce some typedef<\/em>s in the examples where appropriate—for better readability.<\/p>\n<\/div>\n

              Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":165,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,26],"tags":[395,519,144,396,397,213,95,245,486,40,287],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/14478"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/165"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=14478"}],"version-history":[{"count":6,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/14478\/revisions"}],"predecessor-version":[{"id":19511,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/14478\/revisions\/19511"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=14478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=14478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=14478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}