-
inkey()
could anyone help me with the inkey() function within c++? i would just like
to know the parameters allowed and this is my problem...
i need to find the end of an entered formula.
basically find the enter(*pressed) at the end.
i believe it is like this inkey(32) but i'm not sure
my code would be:
do{
} while(inkey(32));
could i also use this:
*replacing just after the while...
(cin >> in[count1]) != ascii(32)
not sure what it is...kinda rusty in the input areas.
thanks for any help given.
-
Re: inkey()
inkey() is not a standard C++ function. I don't see any advantage in
using this function instead of getch(), and then cheking the result to
see if it doesn't equal '\n'. It's more readable and maintainable than
using hardcoded ASCII values.
Danny
Craig wrote:
>
> could anyone help me with the inkey() function within c++? i would just like
> to know the parameters allowed and this is my problem...
>
> i need to find the end of an entered formula.
> basically find the enter(*pressed) at the end.
> i believe it is like this inkey(32) but i'm not sure
> my code would be:
> do{
> } while(inkey(32));
>
> could i also use this:
> *replacing just after the while...
>
> (cin >> in[count1]) != ascii(32)
> not sure what it is...kinda rusty in the input areas.
>
> thanks for any help given.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks