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. Why VC++ .NET 2005 adds a function to a class in a different cpp file?

Why VC++ .NET 2005 adds a function to a class in a different cpp file?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiohelpquestion
1 Posts 1 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.
  • Y Offline
    Y Offline
    yellowine
    wrote on last edited by
    #1

    It looks odd to me that VC++ .NET 2005 adds a new function to a different cpp file. I have a folder (named as Dialogs) which stores a bunch of header and cpp files of dialogs in a project (MyApp) folder. When I right click mouse in Class View to add a new function to MyDialog class whose header and cpp files are in Dialogs folder within MyApp folder and click OK, Visual Studio automatically adds the definition of the function to the correct header file, however, it adds the function implentation codes to a new cpp file right in the MyApp folder instead of MyDialog with the same name of the class. In order to have VS correctly place the codes to the cpp file under Dialogs folder, I have to specified the location of cpp file in the Add-member-function-wizard. This means that every time I want to add a function to a class whose cpp file in NOT directly under the default project folder (MyApp in this case), I have to explicitly specify location of its cpp file . This is annoying and is NOT the behavior of VS 6.0. Anyone knows a way to fix this or this is the way VS .NET 2005 is?

    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