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
 How to input data from keyboard like scanf

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
cutelong Posted - 01/26/2011 : 03:05:35 AM
OriginPro70
Operating System: windows XP
Why can't I use function scanf to input data?
And what can I do to realize above?
Besides, even when compiling examples provided on http://ocwiki.originlab.com/index.php?title=OriginC:InputBox_%28global_function%29
Origin C tells me there are mistakes.
Thanks!
1   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 01/26/2011 : 03:57:39 AM
Hi,

You are using Origin 7.0, right? The prototype of InputBox function is changed and the example you mentioned cannot run in Origin 7.0. In Origin 7.0, the prototype of InputBox is:

string InputBox(LPCSTR lpcszMsg, DWORD dwOption = 0);

So, you can try the following example in Origin 7.0.

void	run_InputBox()
{
	string		strInput = InputBox("Please enter your name");
	printf("You entered: %s\n", strInput);
}

Currently, our latest version is Origin 8.5, you can download a demo version from this page to have a try again.

Penn

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