Trying to write a simple Blackjack, but there are errors I don't understand
<p>I have a problem with a code of mine. It gives random errors and I don't know why.. I'm a newbie to C++ so please bear with me >.></p>

<p>Here is the code that's problematic:</p>

<pre><code>while (!IsGameOver) {
    struct decktype deck = DeckInit();
    struct card card = PickACard(deck);
    PrintHand(TextCard(card));
}
</code></pre>

<p>The parameter for 'PrintHand' causes compilation errors no matter what I do. Here are both the functions.</p>

<pre><code>char *TextCard(struct card &amp;card) {
    char str[22];
    sprintf(str,"%s of %s (%d)",card_num[card.number],card_type[card.color],card.value);
    return str;
}


struct card PrintHand(char &amp;cardtext) {
    struct card card;
    return card;
}
</code></pre>

<p>PrintHand isn't done yet, but I don't know how to make it work.. Basically what I want to do is feed a string from TextCard to be used in PrintHand. Could you please help? Much appreciated.</p>

<p>EDIT:</p>

<p>The structure 'card' at the moment looks like this.</p>

<pre><code>struct card {
    int color;
    int number;
    int value;
    char *hand;
    int totalvalue;
};
</code></pre>

<p>And the errors are along the lines of "can't convert something to something". Sorry I couldn't be more specific :/</p>
