Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / October 2004

Tip: Looking for answers? Try searching our database.

VS.Net Tools->Options->Text Editor->C/C++->General Navigation Bar DOESN'T???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Alpert - 19 Oct 2004 18:06 GMT
Here's an interesting conundrum.  Consider this simple test program
=================== snip =================
#ifdef IN_CLASS
#  define MYCLASS(rtn) MyClass::##rtn
#else
#  define MYCLASS(rtn) rtn
#endif

#include <stdio.h>

#ifdef IN_CLASS
class MyClass {
    int aa;
public:
    static int test(int a);
};
#endif

int MYCLASS(test)(int a)
{
    // this isn't really going to do much
    return a+a;
}

int main( int argc, char **argv ) {
    printf("hello world\n");
    MYCLASS(test)(2);
    return 0;
}
=================== snip =================

If IN_CLASS is defined, the navigator shows test as part of MyClass.
If IN_CLASS is NOT defined, the navigator shows test as part of MyClass!

Is there any way to do this so the class doesn't show up in the
navigator if IN_CLASS is not defined?  I have a "grown-up" project where
(a) the class doesn't appear in the left combo of the navigator bar and
(b) a whole bunch of MYCLASS methods appear in (Globals)

I tried

#ifdef IN_CLASS
int MyClass::test(int a)
#else
int test(int a)
#endif
{
    // this isn't really going to do much
    return a+a;
}

It might be that

#ifndef IN_CLASS
int test(int a)
#else
int MyClass::test(int a)
#endif

might be better..

ideas?  or do I just have to live with it?

/steveA

Signature

Steve Alpert
my email Fgrir_Nycreg @ vqk.pbz is encrypted with ROT13 (www.rot13.org)
and spaces

Steve Alpert - 21 Oct 2004 15:55 GMT
A related question.
I have in my solution two projects.  They use the some of the same
modules.  One project has IN_CLASS defined and the other not.  The
navigator is not-reponsive to class methods if I have the file open but
it's from the "wrong" project.   Any sensible way to really "share" the
file in the IDE?

Steve Alpert
my email Fgrir_Nycreg @ vqk.pbz is encrypted with ROT13 (www.rot13.org)
and spaces

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.