Passing string literal to function taking 'char *' and getting a compiler warning
<p>Just a syntax question, here is my code snippet. (Sorry, browser isn't letting me paste properly into stack overflow.)</p>

<pre><code>#include &lt;iostream&gt;     /* 'iostream.h' is deprecated. */
#include &lt;cstring&gt;
#include &lt;cstdlib&gt;
#include &lt;cstdio&gt;

using namespace std;    /* Required. */

FILE *OpenFile(char *Filename)
{
        FILE *FP;

        if((FP = fopen(Filename, "r")) == NULL)
        {       /* Error opening file. */
                std::cout &lt;&lt; "[!!] Unable to open database!"
                          &lt;&lt; " Are you sure it exists?\n"
                          &lt;&lt; "[&lt;&lt;] Database Unchanged.\n";
                exit(EXIT_FAILURE);     /* End program. */
        }

        else    /* Properly opened the file. */
                return FP;
}

int main(void)
{
        FILE *Data;     /* Our database file pointer. */
        Data = OpenFile("Data.txt");
        printf("Success!\n");
        return 0;
}
</code></pre>

<p>When I compile, I get the following warning:</p>

<pre><code>$ g++ test.cpp -o test
test.cpp: In function ‘int main()’:
test.cpp:27:28: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
$
</code></pre>

<p>Where am I going wrong?</p>
