| T O P I C R E V I E W |
| trueone |
Posted - 02/09/2003 : 1:31:06 PM hi all,
I need to use sscanf in my script, but when I build my program, it says "Error, function or variable sscanf not found"; However, I have included "string.h" in my file.
The following is quoted from Origin C help, it doesn't work also. ----------------------------------------------- char str2[10], str1[]="Hello C 15 17.56"; char cChar; int iInt; float fFloat; int N; N = sscanf( str1, "%s %c %d %f", str2, &cChar, &iInt, &fFloat); out_str(str1); out_str(str2); printf("%c\n",cChar); out_int("",iInt); out_double("",fFloat); -------------------------------------------------
Can you help me?
Richard |
| 1 L A T E S T R E P L I E S (Newest First) |
| cpyang |
Posted - 02/09/2003 : 2:16:03 PM Which version of Origin are you using?
It is possible that the help files that you obtained via Check-For-Update was reading from more recent header files (string.h) that what was included in the service release. If you fix this yourself by making some small change to your string.h file
1. local the line in string.h #pragma dll(msvcrt, system)
2. add the following line under it int sscanf( LPSTR lpcszBuffer, LPCSTR lpcszFormat, ... );
This will give the prototype for Origin C compiler to connect to the proper function in the system library.
In the next service release, then the string.h will be the correct one. We must have a mismatch with our help system and the actually released header file.
CP
|
|
|