Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Command line I/O question
Command line I/O question [message #187735] Mon, 19 March 2007 22:34
Eclipse UserFriend
Originally posted by: kr4z33.yahoo.com

I figured out how to build and run a C program I am working on using the
gnu compiler, eclipse 3.2.1, and cdt. cool so far :)

The program I am working on relies on textual command line input, i have
a function to get strings with multiple lines up to a certain length of
characters, n. to stop inputting before the maximum length a user is
asked to hit the ESC key (ASCII no. 27) and enter. The function works on
nix and windows command line, in the eclipse console, it seems that the
ESC key is overlooked. heres the function:

void getMultilineString(char *string, int n)
{
char input;
int i = 0;
while((input = getc(stdin)) != 27 && i < n)
{
string[i] = input;
i++;
}
string[i] = '\0';
}


any ideas?
Previous Topic:EclipseCon Presentations
Next Topic:Wrong make target started before debugging
Goto Forum:
  


Current Time: Thu Nov 14 11:13:33 GMT 2024

Powered by FUDForum. Page generated in 0.03719 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top