{"id":144,"date":"2007-03-17T01:46:00","date_gmt":"2007-03-17T01:46:00","guid":{"rendered":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/"},"modified":"2007-03-17T01:46:00","modified_gmt":"2007-03-17T01:46:00","slug":"use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables","status":"publish","type":"post","link":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/","title":{"rendered":"Use C++ to pass a function a base class and return a derived class, user defined variables"},"content":{"rendered":"<p>Sorry I haven&#8217;t had any new apache batik\/svg updates. <br \/>I&#8217;m into some C++ work now and haven&#8217;t had time to work on it. <br \/>Pointers, I hate them, definitely a pain in the butt.<br \/>I searched all day on the internet and couldn&#8217;t find any examples showing me how to do what I wanted. I finally took a look at some old third party code I have &#038; figured out what I needed.<br \/>So here&#8217;s a rundown of what I was trying to do and what I figured out.<br \/>I have a base class A with an int x.<br \/>I have a bunch of derived classes of A, each with their own set of variables. <br \/>Let&#8217;s work with derived class B, which has a double i.<br \/>I have a function which accepts an A and sets an array of user defined variables for each derived class.<br \/>The array type is a struct, part of which is a union made up of pointers to each derived class.<br \/>class A<br \/>{<br \/>int x;<br \/>}<\/p>\n<p>class B : public A<br \/>{<br \/>double i;<br \/>}<\/p>\n<p>union P<br \/>{<br \/>B* b;<br \/>.<br \/>.<br \/>.<br \/>.<br \/>}<\/p>\n<p>struct Row<br \/>{<br \/>int status;<br \/>P p;<br \/>}<\/p>\n<p>Row values[2];<\/p>\n<p>void setInfo( int index, A* _a )<br \/>{<br \/> \/\/ just for this example, i know _a is a B<br \/>  values[index].p.b = static_cast(B*)(_a);<br \/>}<\/p>\n<p>I call setInfo like this:<br \/>B* b1 = new B( 4, 5.2 );  \/\/ 4 gets passed to base class A, so x = 4, i = 5.2<br \/>BTW setInfo lives in another class c, so<br \/>c->setInfo( 0, b1 );<\/p>\n<p>Ok. Now I want a get function to return B, but I need it returned in the parameter list, not the easy way by using the function return value. The reason for this is in my real work, I have multiple values which need to be returned.<br \/>So here&#8217;s what my get function looks like:<\/p>\n<p>getInfo( int index, A&#038; _a )<br \/>{<br \/>  \/\/ just for this example, i know _a is a B<br \/>  (static_cast(A&#038;)(_a)) = (*values[index].p.b);<br \/>}<\/p>\n<p>I call getInfo like this:<br \/>B b2;<br \/>c->getInfo( 0, b2 );<\/p>\n<p>Beautiful.<\/p>\n<p>So this is how I pass a function multiple base class parameters and return multiple derived class parameters containing user defined variables. Easy enough I guess. I still hate pointers though.<\/p>\n<p><a href=\"http:\/\/amy1975.bugdoctor.hop.clickbank.net\/\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" decoding=\"async\" style=\"display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\/s400\/error_doctor.gif?ssl=1\" border=\"0\" alt=\"Error Doctor 2007 ***Brand New 2007 Version\" id=\"BLOGGER_PHOTO_ID_5042715741281846978\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sorry I haven&#8217;t had any new apache batik\/svg updates. I&#8217;m into some C++ work now and haven&#8217;t had time to work on it. Pointers, I hate them, definitely a pain in the butt.I searched all day on the internet and couldn&#8217;t find any examples showing me how to do what I wanted. I finally took [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","om_disable_all_campaigns":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[302,288,300,303,301],"tags":[],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-base-class","category-c","category-derived-class","category-function","category-pass-multiple-parameter-values"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Use C++ to pass a function a base class and return a derived class, user defined variables - Zofxare Blog Home<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Use C++ to pass a function a base class and return a derived class, user defined variables - Zofxare Blog Home\" \/>\n<meta property=\"og:description\" content=\"Sorry I haven&#8217;t had any new apache batik\/svg updates. I&#8217;m into some C++ work now and haven&#8217;t had time to work on it. Pointers, I hate them, definitely a pain in the butt.I searched all day on the internet and couldn&#8217;t find any examples showing me how to do what I wanted. I finally took [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/\" \/>\n<meta property=\"og:site_name\" content=\"Zofxare Blog Home\" \/>\n<meta property=\"article:published_time\" content=\"2007-03-17T01:46:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\/s400\/error_doctor.gif\" \/>\n<meta name=\"author\" content=\"zofxare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"zofxare\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/\"},\"author\":{\"name\":\"zofxare\",\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/#\\\/schema\\\/person\\\/094f5dde70100b9f8fbc63174a2a40ce\"},\"headline\":\"Use C++ to pass a function a base class and return a derived class, user defined variables\",\"datePublished\":\"2007-03-17T01:46:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/\"},\"wordCount\":383,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blogger.googleusercontent.com\\\/img\\\/b\\\/R29vZ2xl\\\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\\\/s400\\\/error_doctor.gif\",\"articleSection\":[\"base class\",\"C++\",\"derived class\",\"function\",\"pass multiple parameter values\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/\",\"url\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/\",\"name\":\"Use C++ to pass a function a base class and return a derived class, user defined variables - Zofxare Blog Home\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blogger.googleusercontent.com\\\/img\\\/b\\\/R29vZ2xl\\\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\\\/s400\\\/error_doctor.gif\",\"datePublished\":\"2007-03-17T01:46:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/#\\\/schema\\\/person\\\/094f5dde70100b9f8fbc63174a2a40ce\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blogger.googleusercontent.com\\\/img\\\/b\\\/R29vZ2xl\\\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\\\/s400\\\/error_doctor.gif\",\"contentUrl\":\"https:\\\/\\\/blogger.googleusercontent.com\\\/img\\\/b\\\/R29vZ2xl\\\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\\\/s400\\\/error_doctor.gif\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/2007\\\/03\\\/17\\\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Use C++ to pass a function a base class and return a derived class, user defined variables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/\",\"name\":\"Zofxare Blog Home\",\"description\":\"The Zofxare blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/#\\\/schema\\\/person\\\/094f5dde70100b9f8fbc63174a2a40ce\",\"name\":\"zofxare\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/?s=96&d=retro&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/?s=96&d=retro&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/?s=96&d=retro&r=g\",\"caption\":\"zofxare\"},\"url\":\"https:\\\/\\\/zofxare.com\\\/zofxare\\\/blog\\\/author\\\/zofxare\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Use C++ to pass a function a base class and return a derived class, user defined variables - Zofxare Blog Home","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/","og_locale":"en_US","og_type":"article","og_title":"Use C++ to pass a function a base class and return a derived class, user defined variables - Zofxare Blog Home","og_description":"Sorry I haven&#8217;t had any new apache batik\/svg updates. I&#8217;m into some C++ work now and haven&#8217;t had time to work on it. Pointers, I hate them, definitely a pain in the butt.I searched all day on the internet and couldn&#8217;t find any examples showing me how to do what I wanted. I finally took [&hellip;]","og_url":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/","og_site_name":"Zofxare Blog Home","article_published_time":"2007-03-17T01:46:00+00:00","og_image":[{"url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\/s400\/error_doctor.gif","type":"","width":"","height":""}],"author":"zofxare","twitter_card":"summary_large_image","twitter_misc":{"Written by":"zofxare","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/#article","isPartOf":{"@id":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/"},"author":{"name":"zofxare","@id":"https:\/\/zofxare.com\/zofxare\/blog\/#\/schema\/person\/094f5dde70100b9f8fbc63174a2a40ce"},"headline":"Use C++ to pass a function a base class and return a derived class, user defined variables","datePublished":"2007-03-17T01:46:00+00:00","mainEntityOfPage":{"@id":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/"},"wordCount":383,"commentCount":0,"image":{"@id":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\/s400\/error_doctor.gif","articleSection":["base class","C++","derived class","function","pass multiple parameter values"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/","url":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/","name":"Use C++ to pass a function a base class and return a derived class, user defined variables - Zofxare Blog Home","isPartOf":{"@id":"https:\/\/zofxare.com\/zofxare\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/#primaryimage"},"image":{"@id":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\/s400\/error_doctor.gif","datePublished":"2007-03-17T01:46:00+00:00","author":{"@id":"https:\/\/zofxare.com\/zofxare\/blog\/#\/schema\/person\/094f5dde70100b9f8fbc63174a2a40ce"},"breadcrumb":{"@id":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/#primaryimage","url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\/s400\/error_doctor.gif","contentUrl":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhfoaUYL1i7A0EOdYtCggspgZ12ydbph8W-bqwc8iYE31fN8fhHrHIIzpy6vsWciKr3yG2UpUtKTPgl9pak-KAQUIjsEz0s2791WylJmHsHq6f3w3eDgqE5u82uVnvPBMjBFbmFJQouRJEI\/s400\/error_doctor.gif"},{"@type":"BreadcrumbList","@id":"https:\/\/zofxare.com\/zofxare\/blog\/2007\/03\/17\/use-c-to-pass-a-function-a-base-class-and-return-a-derived-class-user-defined-variables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zofxare.com\/zofxare\/blog\/"},{"@type":"ListItem","position":2,"name":"Use C++ to pass a function a base class and return a derived class, user defined variables"}]},{"@type":"WebSite","@id":"https:\/\/zofxare.com\/zofxare\/blog\/#website","url":"https:\/\/zofxare.com\/zofxare\/blog\/","name":"Zofxare Blog Home","description":"The Zofxare blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zofxare.com\/zofxare\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zofxare.com\/zofxare\/blog\/#\/schema\/person\/094f5dde70100b9f8fbc63174a2a40ce","name":"zofxare","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=retro&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=retro&r=g","caption":"zofxare"},"url":"https:\/\/zofxare.com\/zofxare\/blog\/author\/zofxare\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/zofxare.com\/zofxare\/blog\/wp-json\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zofxare.com\/zofxare\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zofxare.com\/zofxare\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zofxare.com\/zofxare\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/zofxare.com\/zofxare\/blog\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":0,"href":"https:\/\/zofxare.com\/zofxare\/blog\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"wp:attachment":[{"href":"https:\/\/zofxare.com\/zofxare\/blog\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zofxare.com\/zofxare\/blog\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zofxare.com\/zofxare\/blog\/wp-json\/wp\/v2\/tags?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}