| www.delorie.com/archives/browse.cgi | search |
| Newsgroups: | comp.os.msdos.djgpp |
| From: | LEONARD Daniel <leonard AT JSP DOT UMontreal DOT CA> |
| Subject: | Re: Argument problem |
| In-Reply-To: | <7lfub9$b64@nnrp1.farm.idt.net> |
| Message-ID: | <Pine.SGI.3.96.990706171545.13269B-100000@epsom.jsp.umontreal.ca> |
| References: | <7lfub9$b64 AT nnrp1 DOT farm DOT idt DOT net> |
| MIME-Version: | 1.0 |
| Lines: | 35 |
| Date: | Tue, 06 Jul 1999 21:16:33 GMT |
| NNTP-Posting-Host: | 132.204.45.25 |
| X-Complaints-To: | abuse AT umontreal DOT ca |
| X-Trace: | carnaval.risq.qc.ca 931295793 132.204.45.25 (Tue, 06 Jul 1999 17:16:33 EDT) |
| NNTP-Posting-Date: | Tue, 06 Jul 1999 17:16:33 EDT |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| X-MIME-Autoconverted: | from QUOTED-PRINTABLE to 8bit by delorie.com id VAB31353 |
| Reply-To: | djgpp AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
You should use strcmp(const char*, const char*) in string.h
What you are doing now is comparing the value of two char*.
-------------
Daniel Léonard
Computer Science Student "Anything worthwhile takes time"
Université de Montréal -Phong in Enzo the Smart, Reboot
http://www.jsp.umontreal.ca/~leonard
On Thu, 1 Jul 1999, Tom Beauchamp wrote:
> int main(int argc, char *args[]) {
> if (args[1] == "hello") cout<<"Hello";
> return 0;
> }
>
> Produces no output when called with "program hello". Why not? Is it because
> I didn't compare it to "hello\o"? Please Help
>
> Tom Beauchamp
>
> --
>
>
> Visit the Tomb!
> http://www.geocities.com/Area51/Shadowlands/3419/
>
>
>
>
>
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |