title: error: expression must have pointer-to-object type
body: <p>I tried to design a program that will return the original 32bit value <code>w</code> but change the number <code>i</code> element to <code>1</code>. Here's the function I got so far. But for this part, <code>v[i]=1;</code> , it just says that for <code>i</code> expression must have pointer to object type.</p>
  
  <pre><code> unsigned int setBit(unsigned int w,unsigned int i)
   {
      unsigned int v = w;
      v[i]=1;
      return v;
   }
  </code></pre>