Declaring a char which takes a preprocessor macro?
<p>I am using a provided API which has some macro definitions for integers as follows:</p>

<pre><code>// Macros for logic values
#define LOGIC_UNSET -1
#define LOGIC_ZERO   0
#define LOGIC_ONE    1
#define LOGIC_D      2 
#define LOGIC_DBAR   3
#define LOGIC_X      4 

// Macros for fault types
#define NOFAULT   -1
#define FAULT_SA0 0
#define FAULT_SA1 1
</code></pre>

<p>Now, in a one of the API functions, it is declaring a variable of type <code>char</code> and is the value being assigned to this <code>char</code> is that of one of the macros. </p>

<pre><code>bool getObjective(Gate* &amp;g, char &amp;v, Circuit* myCircuit)
</code></pre>

<p>Where <code>v</code> receives the value of of the <code>LOGIC</code> macros.</p>

<p>This doesnt make sense to me and when i was trying to do <code>cout</code> on the char, i was getting ascii symbols which didnt help me. Im really confused by this. Is this a mistake? Can you pass an <code>int</code> to a <code>char</code>? And if yes, how can i print the char so that i get the macro or macro value on the console?</p>