How to force a part of program to run just once?
<p>I'm writing a c++ program that needs database and I'm using SQLite. I have a function, <code>createTables()</code>, that creates tables inside my database. But the part of program that really bothers me is that I have to call <code>createTables()</code> every time my program starts. Although SQL queries for creating tables are something like this :</p>

<pre><code>CREATE TABLE IF NOT EXISTS table_name
</code></pre>

<p>But I want to know if it's possible to run a part of code just once <strong>without using <code>if</code> or other conditional statements.</strong> Can I change the program workflow by itself? Can a program change itself?<br>
For example suppose that the original code is :  </p>

<pre><code>createTables();
otherPartOfProgram();
</code></pre>

<p>But for next time ( suppose tables were created successfully in previous run ) Program changed itself and workflow is something like :</p>

<pre><code>otherPartOfProgram();
</code></pre>
