title: C++ error C4700: uninitialized local variable 'i' used
body: <pre><code>1&gt;------ Build started: Project: RageBotGamingEngine, Configuration: Debug Win32 ------
  1&gt;  Sprite.cpp
  1&gt;c:\users\nha\documents\visual studio 2013\projects\ragebotgamingengine\ragebotgamingengine\sprite.cpp(51): error C4700: uninitialized local variable 'i' used
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>Above is what the output logs say. 
  Below are some related files that could be involved with this problem:   </p>
  
  <p><strong>Sprite.cpp</strong></p>
  
  <pre><code>#include "Sprite.h"
  #include "Vertex.h"
  
  #include &lt;cstddef&gt;
  
  Sprite::Sprite()
  {
  _vboID = 0;
  }
  
  
  Sprite::~Sprite()
  {
  if (_vboID != 0) {
      glDeleteBuffers(1, &amp;_vboID);
  }
  }
  
  void Sprite::init(float x, float y, float width, float height) {
  _x = x;
  _y = y;
  _width = width;
  _height = height;
  
  if (_vboID == 0) {
      glGenBuffers(1, &amp;_vboID);
  }
  
  Vertex vertexData[6];
  
  //First Triangle
  vertexData[0].position.x = x + width;
  vertexData[0].position.y = y + width;
  
  vertexData[1].position.x = x;
  vertexData[1].position.y = y + height;
  
  vertexData[2].position.x = x;
  vertexData[2].position.y = y;
  
  //Second Triangle
  vertexData[3].position.x = x;
  vertexData[3].position.y = y;
  
  vertexData[4].position.x = x + width;
  vertexData[4].position.y = y;
  
  vertexData[5].position.x = x + width;
  vertexData[5].position.y = y + height;
  
  for (int i; i &lt; 6; i++) {
      vertexData[i].color.r = 255;
      vertexData[i].color.g = 0;
      vertexData[i].color.b = 255;
      vertexData[i].color.a = 255;
  }
  
  glBindBuffer(GL_ARRAY_BUFFER, _vboID);
  glBufferData(GL_ARRAY_BUFFER, sizeof(vertexData), vertexData, GL_STATIC_DRAW);
  
  glBindBuffer(GL_ARRAY_BUFFER, 0);
  }
  
  void Sprite::draw() {
  glBindBuffer(GL_ARRAY_BUFFER, _vboID);
  
  glEnableVertexAttribArray(0);
  
  //This is position attribute pointer
  glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, position));
  //This is color attribute pointer
  glVertexAttribPointer(1, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Vertex), (void*)offsetof(Vertex, color));
  
  glDrawArrays(GL_TRIANGLES, 0, 6);
  
  glDisableVertexAttribArray(0);
  
  glBindBuffer(GL_ARRAY_BUFFER, 0);
  }
  </code></pre>
  
  <p>I have tried to find the problem but I'm relatively new to OpenGL, SDL, &amp; C++ &amp; as you can imagine it has been a huge hassle because of the fact that the OpenGL wiki isn't exactly easy to follow &amp; consistent. Just about any help would be very much needed as well as appreciated.</p>
  
  <p>I'm trying to create a Game Engine (obviously I'm pretty much un-skilled &amp; lack the time to develop this project)</p>