List memberfunctions

This is a discussion on List memberfunctions within the C++ Programming forums, part of the General Programming Boards category; Hi, I'm working on a Visual C++ project without MFC. My project has different CPP files. I use a self ...

  1. #1
    Registered User Ward's Avatar
    Join Date
    Sep 2001
    Location
    Belgium
    Posts
    39

    Unhappy List memberfunctions

    Hi,

    I'm working on a Visual C++ project without MFC.
    My project has different CPP files.
    I use a self made DLL that contains classes.
    Each CPP file includes a header file that describes a class that is implemented in the DLL.

    Let's say I have File1.CPP and File2.cpp.

    If I've created an instance of a class in File1.cpp, and I want to access a (public) memberfunction, I type:
    MyClass myObj;
    myObj.
    and I automatically get a list of all the memberfunction and membervariables of this object.
    If I do the same I File2.cpp I do not get that list of memberfunctions.

    I think this has something to do with the "Source Browse Info File"

    How come the behaviour of Visual C++ is different?
    Can somebody tell me what I am doing wrong here?

    Thanks in advance!
    Greetings.

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    53
    From what you've said it sounds like you're creating the instance in one source file and trying to access its member functions in another source file - which i think may be stretching the scope of its definition somewhat

    I may be wrong...

    Almosthere
    "Technology has merely provided us with a more efficient means for going backwards" - Aldous Huxley

  3. #3
    Registered User Ward's Avatar
    Join Date
    Sep 2001
    Location
    Belgium
    Posts
    39
    No, you've got me wrong there.
    In File1.CPP I use the class MyClass the following way:

    MyClass myObj1;
    myObj1.SomeFunctionA();

    And in File2.cpp I use the class MyClass too, just the same way:

    MyClass myObj2;
    myObj2.SomeFunctionB();

    It has nothing to do with scope problems, because then I would have compile errors.
    I sometimes notice a different behaviour of Visual C++.
    In File1.cpp I get the list of memberfunctions when I'm typing
    the object's name (myObj1) and a point.
    But in File2.cpp when I type the object's name and a point, Visual C++ does not show me the list of memberfunctions.

    To be clear: my code compiles and links just fine.


    Can you tell me how this is possible? (Visual C++ does not work the same way when I expect it to do)
    Greetings.

  4. #4
    zen
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    If you're just including the headers for you dll's in your source files that use the functions they contain, the header files should be in the 'External Dependencies' folder in the Workspace window. If this is the case you can get the IntelliSense back by dragging these files (in the Workspace window) into the headers folder. Alternatively you could get Visual Assist, which improves the way that MSVC 6.0 does IntelliSense.
    zen

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Link List math
    By t014y in forum C Programming
    Replies: 17
    Last Post: 02-20-2009, 05:55 PM
  2. Anyone good with linked list.....I am not....
    By chadsxe in forum C++ Programming
    Replies: 11
    Last Post: 11-10-2005, 01:48 PM
  3. instantiated from here: errors...
    By advocation in forum C++ Programming
    Replies: 5
    Last Post: 03-27-2005, 08:01 AM
  4. Linked list with two class types within template.
    By SilasP in forum C++ Programming
    Replies: 3
    Last Post: 02-09-2002, 05:13 AM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21