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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 How to input data from keyboard like scanf
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cutelong

China
1 Posts

Posted - 01/26/2011 :  03:05:35 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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!

Penn

China
644 Posts

Posted - 01/26/2011 :  03:57:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000