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. Managed C++/CLI
  4. Files and class organizations question.

Files and class organizations question.

Scheduled Pinned Locked Moved Managed C++/CLI
c++question
2 Posts 2 Posters 2 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.
  • M Offline
    M Offline
    Maximilien
    wrote on last edited by
    #1

    As far as I can see, there's no header file in Managed C++ ?!?!?!?! everything seems to be inlined in the class like this in either a .h or .cpp file that can be included in the main project file:

    __gc public class MyForm : public Form
    {
    public:
      MyForm()
      {
        Text = S"MyForm";
      };
    };
    

    The question, is, can I separate the implementation for the declaration ? to have a header file and a code file ( .h and .cpp ) ? Are there rules, guidelines or specification ? Thanks. Max.

    N 1 Reply Last reply
    0
    • M Maximilien

      As far as I can see, there's no header file in Managed C++ ?!?!?!?! everything seems to be inlined in the class like this in either a .h or .cpp file that can be included in the main project file:

      __gc public class MyForm : public Form
      {
      public:
        MyForm()
        {
          Text = S"MyForm";
        };
      };
      

      The question, is, can I separate the implementation for the declaration ? to have a header file and a code file ( .h and .cpp ) ? Are there rules, guidelines or specification ? Thanks. Max.

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      Sure you can. In fact unless it's a very simple test class I am trying out, I usually put the declarations in the header and the implementations in the cpp file. Regards, Nish


      Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]

      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