Results 1 to 6 of 6

Thread: runs all ifs??? [*resloved*]

Threaded View

  1. #1

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    runs all ifs??? [*resloved*]

    Code:
    if(argc>2)
    {
    if(argv[1]="open")
    	{
    		...
    	}
    	else if(argv[1]="new")
    	{
    		...
    	}
    }
    when i enter in "cmdline.exe open c:\test.txt", it runs fine, when i run £cmdline.exe new c:\newtext.txt" it trys to open c:\newfile.txt? is this because im trying to use a string in the "if(argv[1] = ..." part??



    Thanks
    Last edited by john tindell; Nov 5th, 2002 at 03:41 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width