Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Visual Studio classview and enum parameters

This topic is 5112 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is something that's bugged me for a while, since I have a few functions that use an enum in the parameters they accept. When you double click on the function name in ClassView, Visual Studio pops up a dialog saying it can't find the definition (implementation) of the function. This only seems to happen for functions that use an enum in their parameter list. It doesn't seem to matter how you write the function, as you can see from this source:
// Test.h

class CTest
    enum Enum1
    void function0(int param);
    void function1(Enum1 param);
    void function2(CTest::Enum1 param);
    void function3(enum CTest::Enum1 param);
// Test.cpp

#include "Test.h"
#include <windows.h>

void CTest::function0(int param)

void CTest::function1(Enum1 param)

void CTest::function2(CTest::Enum1 param)

void CTest::function3(enum CTest::Enum1 param)

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
    CTest test;
    return 0;
This compiles perfectly, but only when you double click function0 in the ClassView do you get to the function definition. The other three functions pop up the error dialog instead. I've used Visual Studio 6, and Visual C++ .Net standard edition, and they both exhibit the same behaviour. Does anyone know how to get this to work, or whether it's a definite limitation that you just have to live with? (Edited to change source spacing) [edited by - AlSun on May 26, 2004 10:34:10 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!