Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. a vc7 question:

a vc7 question:

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    ns
    wrote on last edited by
    #1

    Getting compiler errors for this:

    // This is the main project file for VC++ application project
    // generated using an Application Wizard.

    #include "stdafx.h"

    #using <mscorlib.dll>
    #using <System.dll>
    #using <System.Windows.Forms.dll>

    __gc public class CppForm : public Form {
    public:
    CppForm(){}
    };
    #include <tchar.h>
    using namespace System;
    using namespace System::ComponentModel;
    using namespace System::Windows::Forms;

    // This is the entry point for this application
    int _tmain(void)
    {
    // TODO: Please replace the sample code below with your own.
    Console::WriteLine(S"forms World");
    Application::Run(new CppForm());
    return 0;
    }

    e:\vc7practice\CppForm\CppForm.cpp(10): error C2504: 'Form' : base class undefined

    and

    e:\vc7practice\CppForm\CppForm.cpp(25): error C2665: 'System::Windows::Forms::Application::Run' : none of the 3 overloads can convert parameter 1 from type 'CppForm __gc *'

    What am I doing wrong? Thanks! Appreciate your help, ns

    B 1 Reply Last reply
    0
    • N ns

      Getting compiler errors for this:

      // This is the main project file for VC++ application project
      // generated using an Application Wizard.

      #include "stdafx.h"

      #using <mscorlib.dll>
      #using <System.dll>
      #using <System.Windows.Forms.dll>

      __gc public class CppForm : public Form {
      public:
      CppForm(){}
      };
      #include <tchar.h>
      using namespace System;
      using namespace System::ComponentModel;
      using namespace System::Windows::Forms;

      // This is the entry point for this application
      int _tmain(void)
      {
      // TODO: Please replace the sample code below with your own.
      Console::WriteLine(S"forms World");
      Application::Run(new CppForm());
      return 0;
      }

      e:\vc7practice\CppForm\CppForm.cpp(10): error C2504: 'Form' : base class undefined

      and

      e:\vc7practice\CppForm\CppForm.cpp(25): error C2665: 'System::Windows::Forms::Application::Run' : none of the 3 overloads can convert parameter 1 from type 'CppForm __gc *'

      What am I doing wrong? Thanks! Appreciate your help, ns

      B Offline
      B Offline
      Big Art
      wrote on last edited by
      #2

      Can't help you but just to make things clear, this code is not VC7. It is VC++.NET made with studio.NET. We use VC7 to mean VC++ MFC7 which is also made with studio.NET by selecting a different project option. Art

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups