The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 about sscanf

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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





The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000