int sscanf(const char* kcpBuffer, const char* kcpFormatString, ...);
#include <cstdio> int main() { char caBuffer[] = "Copyright 2009 XoaX"; // Read from the buffer char caCopyright[20]; int iYear = 0; char caXoaX[20]; sscanf(caBuffer, "%s %i %s", caCopyright, &iYear, caXoaX); // Output the read contents printf("Read: %s %i %s\n", caCopyright, iYear, caXoaX); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.