View Single Post
Join Date: Oct 2006
Posts: 2,862
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 301
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Roasting Maven

Re: formated file reading problem

 
0
  #5
Feb 7th, 2008
Did some research for you, and there is a workaround :

  1. #ifndef __stdio_h__
  2. #include <stdio.h>
  3. #define __stdio_h__
  4. #endif
  5.  
  6. int vsscanf_s (const char * src, const size_t length, const char * format, va_list argList);
  7. int vsscanf_s (const char * src, const size_t length, const char * format, va_list argList)
  8. {
  9. return _snscanf_s (src, length, format, * (void **) argList);
  10. }
  11.  
  12. int vsscanf (const char * src, const char * format, va_list argList);
  13. int vsscanf (const char * src, const char * format, va_list argList)
  14. {
  15. return sscanf (src, format, * (void **) argList);
  16. }
Just throw that in the file where you're using vsscanf and it should work again.
If you use this code, use the vsscanf_s instead of the vsscanf if you want to avoid getting anoying "sscanf was declared deprecated" warnings.

Hope this helps. If it doesn't, post some sample data from your file and you'll get advice how to make your own function for it.

Niek
Reply With Quote