title: Operator 'overloading' equivalent with #define in C/Objective-C
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3417413/operator-overloading-in-c">Operator overloading in C</a>  </p>
  </blockquote>
  
  
  
  <p>If I have a struct:</p>
  
  <pre><code>typedef struct myStruct {
      ...
  } myStruct;
  
  myStruct myStructAdd(myStruct a, myStruct b);
  </code></pre>
  
  <p>I need something like this:</p>
  
  <pre><code>#define myStruct a + myStruct b myStructAdd(a, b)
  // NOTE this code does NOT WORK. This is what the question is asking.
  </code></pre>
  
  <p>To make this syntax valid:</p>
  
  <pre><code>myStruct a;
  myStruct b;
  myStruct c = a + b;
  </code></pre>
  
  <p>Is there any way to use a <code>#define</code> to do this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I'm not asking for alternatives to the + syntax. What I'm asking is if, and how, the preprocessor can be used to rewrite the plus syntax to standard C syntax on compile.</p>
  
  <p>i.e. something like <code>#define myStruct a + myStruct b myStructAdd(a, b)</code> which turns <code>myStructA + myStructB</code> into <code>myStructAdd(myStructA, myStructB)</code> on compile.</p>