home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.ans.net!europa.asd.contel.com!paladin.american.edu!auvm!ksadegh
- Organization: The American University - University Computing Center
- Date: Fri, 6 Nov 1992 18:44:52 EST
- From: Kayvon Z. Sadeghi <KSADEGH@auvm.american.edu>
- Message-ID: <92311.184452KSADEGH@auvm.american.edu>
- Newsgroups: comp.lang.c++
- Subject: const char *
- Lines: 32
-
- Hi
-
- I was wondering if there is any difference between the way C, and C++
- handle the "const char *" decleration. You see, I have this peice of code
- that I know it works on C, but my C++ compiler behaves a bit strange.
-
- I have this subroutine call that says:
-
- mycall("");
-
-
- and then somewhere down in my code I have:
-
- mycall(const char *msg){
- if(msg=="")
- dothis();
- if(msg!="")
- dothat();
- }
-
- Strange, but my compiler doesthat() instead of dothis().
- I even checked the value of msg and it *IS* equal to "". Is something wrong
- with my C++ compiler or what? or are strings treated differently in here?
-
- thanks
- k1
- ---
- ------------------------------------------------------------------------
- Of Course, I Could Be Wrong !!!
- ------------------------------------------------------------------------
- Kayvon Sadeghi k.sadeghi@ieee.org
- Voice:202/244-0789
-