Date: Thu, 1 Jul 1999 19:16:42 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Tom Beauchamp cc: djgpp AT delorie DOT com Subject: Re: Argument problem In-Reply-To: <7lfub9$b64@nnrp1.farm.idt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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? You cannot compare strings with the "==" operator. You need to use strcmp or some similar function instead.