• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
sscanf problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sscanf problem


  • Subject: sscanf problem
  • From: David Dauer <email@hidden>
  • Date: Wed, 28 Jan 2004 14:10:36 +0100

Hello,


I've got a strange problem using sscanf:

const char *s;
char theString[ 256 ];

s = "123 456 \"blah\"";

int theInt1;
int theInt2;

sscanf( s, "%d %d \"%s\"", &theInt1, &theInt2, theString );

NSLog(@"%@",[NSString stringWithCString:theString]);

This returns a string 'blah"' - and i've no idea why i get a quote sign at
the end of the string.

Anyone knows why this happens and how to fix that?

Thanks

David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: sscanf problem
      • From: lbland <email@hidden>
    • Re: sscanf problem
      • From: Marco Scheurer <email@hidden>
  • Prev by Date: Re: List of Images like in System Preferences
  • Next by Date: Re: Images in folder - simple question?
  • Previous by thread: Re: List of Images like in System Preferences
  • Next by thread: Re: sscanf problem
  • Index(es):
    • Date
    • Thread