user24556: I'm trying to understand how "invalidateblock"-function works, literally line by line.
Since I'm at basic level in C++, I couldn't explain to myself what's the "&" after "Array" there to achieve though I know of references and pointers and though I've found out that it's a so called "type modifier". Still I'm wondering "Array" is a type just like "int", "char" etc.
Where can I find more information on where Array is defined/explained?What are member functions?
Thanks in advance! 

user85: It's part of the JSON code. An Array is a JSON entity that contains an ordered list of zero or more JSON entities. As its name, "params", suggests, this one contains the parameters to the command. So when you see:
std::string strHash = params[0].get_str();

That gets the first parameter into a string called strHash. This makes sense since the first (and only) parameter to invalidateblock is a hash, as this help text indicates:
        "invalidateblock \"hash\"\n"
        "\nPermanently marks a block as invalid, as if it violated a consensus rule.\n"
        "\nArguments:\n"
        "1. hash   (string, required) the hash of the block to mark as invalid\n"
        "\nResult:\n"
        "\nExamples:\n"


24556: <p>I'm trying to understand how "invalidateblock"-function works, literally line by line.</p>

<p>Since I'm at basic level in C++, I couldn't explain to myself what's the "&amp;" after "Array" there to achieve though I know of references and pointers and though I've found out that it's a so called "type modifier". Still I'm wondering "Array" is a type just like "int", "char" etc.</p>

<p>Where can I find more information on where Array is defined/explained?What are member functions?</p>

<p>Thanks in advance! </p>
 85: <p>It's part of the JSON code. An <a href="https://www.json.com/json-array" rel="nofollow">Array</a> is a JSON entity that contains an ordered list of zero or more JSON entities. As its name, "params", suggests, this one contains the parameters to the command. So when you see:</p>

<pre><code>std::string strHash = params[0].get_str();
</code></pre>

<p>That gets the first parameter into a <code>string</code> called <code>strHash</code>. This makes sense since the first (and only) parameter to invalidateblock is a hash, as this help text indicates:</p>

<pre><code>        "invalidateblock \"hash\"\n"
        "\nPermanently marks a block as invalid, as if it violated a consensus rule.\n"
        "\nArguments:\n"
        "1. hash   (string, required) the hash of the block to mark as invalid\n"
        "\nResult:\n"
        "\nExamples:\n"
</code></pre>
