title: No default constructor exists for class but I have declared one
body: <p>I have this occur twice in my code,
  I'm not sure why it's complaining
  I have a header file "Scene.h":</p>
  
  <pre><code>#pragma once
  
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  #include "Image.h"
  #include "InteractiveObject.h"
  
  using namespace std;
  
      class Scene
      {
      public:
          int id;
          string title;
          Image* backgroundImage;
          InteractiveObject interactiveObjects[ 1 ];
  
          D3DXVECTOR3 pos;
  
          Scene( int id_, string title_, Image* backgroundImage_ )
              : 
              id( id_ ),
              title( title_ ),
              backgroundImage( backgroundImage_ )
          {
              this-&gt;pos.x = 0.0f;
              this-&gt;pos.y = 0.0f;
              this-&gt;pos.z = 0.0f;
          }
      };
  </code></pre>
  
  <p>I have another file called "InteractiveObject.h":</p>
  
  <pre><code>#pragma once
  
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  #include "Image.h"
  enum { CHARACTER, OBJECT };
  
  class InteractiveObject
  {
  public:
      int id;
      int type;
  
      float x;
      float y;
      float z;
  
      D3DXVECTOR3 pos;
  
      string title;
      Image* theImage;
      InteractiveObject( int id_, string title_, Image* theImage_, int type, float x, float y, float z )
          : 
          id( id_ ),
          title( title_ ),
          theImage( theImage_ )
      {
          this-&gt;pos.x = x;
          this-&gt;pos.y = y;
          this-&gt;pos.z = z;
      }
  };
  </code></pre>
  
  <p>My intellisense is complaining that there is:</p>
  
  <blockquote>
    <p>Error 1   error C2512: 'InteractiveObject' : no appropriate default
    constructor available c:\users\james\documents\visual studio
    2012\projects\game\game\scene.h   26  1   Game</p>
  </blockquote>
  
  <p>Any ideas considering both have default constructors?</p>
  
  <p>EDIT::----------</p>
  
  <p>Okay so thanks to everyone here, I can see that if I do this:;</p>
  
  <pre><code>InteractiveObject( int id_, string title_, Image* theImage_, int type_, float x_, float y_, float z_ )
          : 
          id( id_ ),
          title( title_ ),
          theImage( theImage_ ),
          type( type_ ),
          x( x_ ),
          y( y_ ),
          z( z_ )
      {
  </code></pre>
  
  <p>The problem disappears.. I'm not sure this is the best way of doing it and I will no doubt come back crying in a few moments. Can you please vote the answer that delivers what you think is the most concise answer?</p>
  
  <p>My current requirement is to have a Scene contain a certain amount of interactive objects declared on my game constructor and iterated over to draw to the screen:</p>
  
  <p>"game.cpp":</p>
  
  <pre><code>Game::Game( HWND hWnd, Mouse &amp;mouse  )
      :
      gfx( hWnd ),
      mouse( mouse )
  {
      gfx.d3dDevice-&gt;SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE);
  
      //--------------Scene 0---------------
      scenes[ 0 ] = Scene( 0, "La barra de funk", new Image( gfx, "Images/Scene/Area/Bar/Background.jpg", 1024, 768, FALSE ) );
      scenes[ 0 ].interactiveObjects[ 0 ] = new InteractiveObject( 0, "la rockola de muse", new Image( gfx, "Images/Scene/Area/Bar/InteractiveObjects/Jukebox.png", 428, 586, TRUE ), OBJECT, 300.0f, 200.0f, 1.0f );
  };
  
  Game::~Game()
  {
      // Delete scenes array
  
      /*for( int a = 0; a &lt; sizeof( scenes ) / sizeof( Scene ); a++ )
      {
          scenes[ a ] = NULL;
          delete scenes[ a ];
      }*/
  };
  
  void Game::Go()
  {
      gfx.Begin();
      ComposeFrame();
      gfx.End();
      gfx.Present();
  };
  
  void Game::ComposeFrame()
  {
      for each ( Scene currentScene in scenes )
      {
          currentScene.backgroundImage-&gt;sprite-&gt;Begin( D3DXSPRITE_ALPHABLEND );
          currentScene.backgroundImage-&gt;sprite-&gt;Draw( currentScene.backgroundImage-&gt;gTexture, NULL, NULL, &amp;currentScene.pos, 0xFFFFFFFF );
          currentScene.backgroundImage-&gt;sprite-&gt;End();
  
          for each ( InteractiveObject currentInteractiveObject in currentScene.interactiveObjects )
          {
              currentInteractiveObject.theImage-&gt;sprite-&gt;Begin( D3DXSPRITE_ALPHABLEND );
              currentInteractiveObject.theImage-&gt;sprite-&gt;Draw( currentScene.backgroundImage-&gt;gTexture, NULL, NULL, &amp;currentInteractiveObject.pos, 0xFFFFFFFF );
              currentInteractiveObject.theImage-&gt;sprite-&gt;End();
          }       
      }
  }
  </code></pre>