{"id":21424,"date":"2022-11-13T13:35:05","date_gmt":"2022-11-13T08:05:05","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/"},"modified":"2022-11-13T13:35:05","modified_gmt":"2022-11-13T08:05:05","slug":"solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/","title":{"rendered":"[Solved] Errors while creating a dynamic array in a vector class for project [closed]"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-64812881\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"64812881\" data-parentid=\"64812538\" data-score=\"0\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p><code>push_back()<\/code> and <code>insert()<\/code> both call <code>grow()<\/code>, which fails to increase the <code>capacity<\/code> because <code>GROWER<\/code> is an <code>int<\/code>, so <code>1.6<\/code> truncates to <code>1<\/code>, and multiplying <code>capacity * 1<\/code> doesn&#8217;t change its value.  But even if <code>capacity<\/code> were increased properly, the <code>data_ptr<\/code> array is not being re-allocated at all to fit the new <code>capacity<\/code>.<\/p>\n<p>But even if <code>grow()<\/code> were working properly, there is no need to call <code>grow()<\/code> on every insertion of a new element, that defeats the purpose of separating <code>n_elems<\/code> from <code>capacity<\/code> to begin with.  You should grow the array only when <code>n_elems<\/code> has reached <code>capacity<\/code>.<\/p>\n<p>There are many other problems with your class, as well:<\/p>\n<ul>\n<li>\n<p><code>operator=<\/code> is not testing for self-assignment, and is leaking the allocated memory of the old array.  Consider using the copy-swap idiom instead.<\/p>\n<\/li>\n<li>\n<p><code>front()<\/code> does not reach the <code>throw<\/code> statement when the array is empty.<\/p>\n<\/li>\n<li>\n<p><code>at()<\/code> and <code>erase()<\/code> are performing bounds checking using <code>capacity<\/code> instead of <code>n_elems<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>push_back()<\/code> is inserting the new value at the wrong index, and not incrementing <code>n_elems<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>pop_back()<\/code> does not <code>throw<\/code> an error when the array is empty, causing <code>n_elems<\/code> to decrement below <code>0<\/code>, which wraps around to the max positive value of <code>size_t<\/code> because <code>size_t<\/code> is <em>unsigned<\/em>.<\/p>\n<\/li>\n<li>\n<p><code>erase()<\/code> and <code>operator==<\/code> go out of bounds while iterating the array.<\/p>\n<\/li>\n<li>\n<p><code>begin()<\/code> and <code>end()<\/code> should not be returning <code>nullptr<\/code> for an empty array.  And <code>end()<\/code> is returning a pointer to the last element in a non-empty array rather than returning a pointer to 1 past the last element.<\/p>\n<\/li>\n<li>\n<p><code>operator==<\/code> and <code>operator!=<\/code> do not perform any bounds checking to make sure the 2 vectors have the same same <code>n_elems<\/code> before iterating their arrays.  And they are comparing element values beyond <code>n_elems<\/code>. Also, <code>operator!=<\/code> is returning the wrong result.<\/p>\n<\/li>\n<\/ul>\n<p>With that said, try something more like this:<\/p>\n<pre class=\"lang-cpp prettyprint-override\"><code>#include &lt;stdexcept&gt;\n#include &lt;algorithm&gt;\n#include \"Vector.h\"\n\nvoid Vector::grow()\n{\n    static const float GROWER = 1.6f;\n    size_t new_capacity = capacity * GROWER;\n    if (new_capacity &lt;= capacity)\n        throw std::overflow_error(\"cant grow capacity\");\n    int *new_data_ptr = new int[new_capacity];\n    std::copy(data_ptr, data_ptr + n_elems, new_data_ptr);\n    delete[] data_ptr;\n    data_ptr = new_data_ptr;\n    capacity = new_capacity;\n}\n\nVector::Vector()\n{\n    capacity = CHUNK;\n    n_elems = 0;\n    data_ptr = new int[capacity];\n}\n\nVector::Vector(const Vector&amp; v)\n{\n    capacity = v.capacity;\n    n_elems = v.n_elems;\n    data_ptr = new int[capacity];\n    std::copy(v.begin(), v.end(), data_ptr);\n}\n\nVector&amp; Vector::operator=(const Vector&amp; v)\n{\n    if (this != &amp;v)\n    {\n        Vector temp(v);\n        std::swap(capacity, temp.capacity);\n        std::swap(n_elems, temp.n_elems);\n        std::swap(data_ptr, temp.data_ptr);\n    }\n    return *this;\n}\n\nVector::~Vector()\n{\n    delete[] data_ptr;\n}\n\nint Vector::front() const\n{\n    if (n_elems == 0)\n        throw std::range_error(\"Range Error\");\n    return data_ptr[0];\n}\n\nint Vector::back() const\n{\n    if (n_elems == 0)\n        throw std::range_error(\"Range Error\");\n    return data_ptr[n_elems - 1];\n}\n\nint Vector::at(size_t pos) const\n{\n    if (pos &gt;= n_elems)\n        throw std::range_error(\"Range Error\");\n    return data_ptr[pos];\n}\n\nsize_t Vector::size() const\n{\n    return n_elems;\n}\n\nbool Vector::empty() const\n{\n    return (n_elems == 0);\n}\n\nint&amp; Vector::operator[](size_t pos)\n{\n    return data_ptr[pos];\n}\n\nvoid Vector::push_back(int item)\n{\n    if (n_elems == capacity)\n        grow();\n    data_ptr[n_elems] = item;\n    ++n_elems;\n}\n\nvoid Vector::pop_back()\n{\n    if (n_elems == 0)\n        throw std::range_error(\"Range Error\");\n    --n_elems;\n}\n\nvoid Vector::erase(size_t pos)\n{\n    if (pos &gt;= n_elems)\n        throw std::range_error(\"Range Error\");\n    std::copy(data_ptr + pos + 1, data_ptr + n_elems, data_ptr + pos);\n    --n_elems;\n}\n\nvoid Vector::insert(size_t pos, int item)\n{\n    if (pos &gt; n_elems) \/\/ insert at end() is OK...\n        throw range_error(\"Range Error\");\n    if (n_elems == capacity)\n        grow();\n    std::copy_backward(data_ptr + pos, data_ptr + n_elems, data_ptr + n_elems + 1);\n    data_ptr[pos] = item;\n    ++n_elems;\n}\n\nvoid Vector::clear()\n{\n    n_elems = 0;\n}\n\nint* Vector::begin()\n{\n    return data_ptr;\n}\n\nint* Vector::end()\n{\n    return data_ptr + n_elems;\n}\n\nbool Vector::operator==(const Vector&amp; v) const\n{\n    return (n_elems == v.n_elems) &amp;&amp; std::equal(v.begin(), v.end(), data_ptr);\n}\n\nbool Vector::operator!=(const Vector&amp; v) const\n{\n    return !(*this == v);\n}\n<\/code><\/pre>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">1<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved Errors while creating a dynamic array in a vector class for project [closed] <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] push_back() and insert() both call grow(), which fails to increase the capacity because GROWER is an int, so 1.6 truncates to 1, and multiplying capacity * 1 doesn&#8217;t change its value. But even if capacity were increased properly, the data_ptr array is not being re-allocated at all to fit the new capacity. But even &#8230; <a title=\"[Solved] Errors while creating a dynamic array in a vector class for project [closed]\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/\" aria-label=\"More on [Solved] Errors while creating a dynamic array in a vector class for project [closed]\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[361,324,806],"class_list":["post-21424","post","type-post","status-publish","format-standard","hentry","category-solved","tag-arrays","tag-c","tag-vector"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[Solved] Errors while creating a dynamic array in a vector class for project [closed] - JassWeb<\/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:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] Errors while creating a dynamic array in a vector class for project [closed] - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] push_back() and insert() both call grow(), which fails to increase the capacity because GROWER is an int, so 1.6 truncates to 1, and multiplying capacity * 1 doesn&#8217;t change its value. But even if capacity were increased properly, the data_ptr array is not being re-allocated at all to fit the new capacity. But even ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-13T08:05:05+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\\\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#\\\/schema\\\/person\\\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] Errors while creating a dynamic array in a vector class for project [closed]\",\"datePublished\":\"2022-11-13T08:05:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\\\/\"},\"wordCount\":275,\"publisher\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#organization\"},\"keywords\":[\"arrays\",\"c++\",\"vector\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\\\/\",\"url\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\\\/\",\"name\":\"[Solved] Errors while creating a dynamic array in a vector class for project [closed] - JassWeb\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#website\"},\"datePublished\":\"2022-11-13T08:05:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] Errors while creating a dynamic array in a vector class for project [closed]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#website\",\"url\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/jassweb.com\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/jass-website-logo-1.png\",\"contentUrl\":\"https:\\\/\\\/jassweb.com\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#\\\/schema\\\/person\\\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/wp-content\\\/litespeed\\\/avatar\\\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400\",\"url\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/wp-content\\\/litespeed\\\/avatar\\\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400\",\"contentUrl\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/wp-content\\\/litespeed\\\/avatar\\\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\\\/\\\/jassweb.com\"],\"url\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/author\\\/jaspritsinghghumangmail-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] Errors while creating a dynamic array in a vector class for project [closed] - JassWeb","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:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] Errors while creating a dynamic array in a vector class for project [closed] - JassWeb","og_description":"[ad_1] push_back() and insert() both call grow(), which fails to increase the capacity because GROWER is an int, so 1.6 truncates to 1, and multiplying capacity * 1 doesn&#8217;t change its value. But even if capacity were increased properly, the data_ptr array is not being re-allocated at all to fit the new capacity. But even ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/","og_site_name":"JassWeb","article_published_time":"2022-11-13T08:05:05+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] Errors while creating a dynamic array in a vector class for project [closed]","datePublished":"2022-11-13T08:05:05+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/"},"wordCount":275,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["arrays","c++","vector"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/","url":"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/","name":"[Solved] Errors while creating a dynamic array in a vector class for project [closed] - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-11-13T08:05:05+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-errors-while-creating-a-dynamic-array-in-a-vector-class-for-project-closed\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] Errors while creating a dynamic array in a vector class for project [closed]"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/21424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=21424"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/21424\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=21424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=21424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=21424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}