Results 1 to 9 of 9

Thread: class functions are not listing [ in VC++ editor]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Posts
    157
    Qt products
    Qt3 Qt4
    Thanks
    12
    Thanked 1 Time in 1 Post

    Default class functions are not listing [ in VC++ editor]

    i am working in Qt 4.2.2, using the VC++ .net versiong( 2007 ).
    Here i am testing some classes using test cases .Instead of write the junk of code [testing code] in main.cpp
    i created a testMacro.h, here i will write the test code as MACRO [ eg: TEST_CASE_1 ].

    Then i am including this "testMacro.h" in the main.cpp.
    In main.cpp i can DISABLE or ENABLE individual test or the whole test cases which is written in testMacro.h
    It's working properly.

    My problem is , in testMacro.h file while creating a object "myObject" of class "MyClass" [just for testing] ,
    then if am puting dot [.] or arrow[->] to list the member functions.It is not listing any of the class member's



    NOTE:
    I have included "MyClass.h,"
    The MyClass contains public members.
    If am creating any "myObject" in main.cpp , it will list the member functions of "MyClass",while putting arrow or dot operator.
    Why it's not working in "testMacro.h" file.


    See my main.cpp
    Qt Code:
    1. #include "MyClass.h"
    2.  
    3. int main( )
    4. {
    5.  
    6. MyClass myObj;
    7.  
    8. myObj.foo(); // here the dot operator [.] will list the foo() automatically in VC++ editor
    9.  
    10.  
    11. }
    To copy to clipboard, switch view to plain text mode 

    see testMacro.h
    Qt Code:
    1. #include "MyClass.h"
    2.  
    3. MyClass myObj;
    4. myObj.foo(); //here the editor will not show the foo()
    5. //even after putting the dot operator [.]
    6.  
    7.  
    8. #define TEST_CASE_1
    9. /* i will attach the code " myObj.foo(); " here in the macro later */
    10.  
    11.  
    12.  
    13.  
    14. #define TEST_CASE_2
    15.  
    16. #define TEST_CASE_3
    To copy to clipboard, switch view to plain text mode 




    please direct me ...if am doing anything wrong.
    Last edited by joseph; 4th April 2007 at 07:00.

Similar Threads

  1. Replies: 2
    Last Post: 16th March 2007, 09:04
  2. virtual overloaded functions and base class function call...
    By nouknouk in forum General Programming
    Replies: 7
    Last Post: 11th March 2006, 21:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.