Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

scanf question

Name: Anonymous 2007-11-26 18:17

I need to use scanf in a way that i can map a string with (at most  2) whitespaces to a char buffer. I know there must be a way to do it but I'm lazy to read the whole manpage for scanf, so if any of you know this please tell me .3

Name: Anonymous 2007-11-26 18:28

[code]
public static long class object main()
  {
    bufBuffer = new buffer Buffer();
    bufBuffer->charBuffer.processWhitespace.maximumWhitepace(long int 2);
    stdinSTDIN = new InputFactory();
    stdinSTDIN->SetNewBufferHandler(bufBuffer);
  }
[code]

Name: Anonymous 2007-11-26 19:19

Can't be done.

Name: Anonymous 2007-11-26 19:23


void getstr(char *str, size_t n) {
int c;
int ws = 0;
while(n--) {
c = getchar();
if(isspace(c) || c == EOF)
if(c == ' ') ws++;
else break;
if(ws == 2) break;
*str++ = c;
}
*str = 0;
}

I believe that would work.
Gtfo.

Name: Anonymous 2009-08-17 0:54

Lain.

Name: Anonymous 2011-01-01 19:44

>>2
BBCode failure detected.

Name: Anonymous 2011-01-01 20:36

>>4
actually helping + complete lack of intendation + 'Gtfo.'

Get the fuck out. You are no longer welcome here.

Name: Anonymous 2011-01-01 20:37

ENJOY YO'URE FAIL AND AIDS /PROG/

Name: Anonymous 2011-01-01 21:53

>>7
I'll be sure his great grandchildren get the message.

Name: Anonymous 2011-01-01 22:26

>>7
At least he used the [code] tag and nobody FORCES you to INDENT your code, right? Go back to """/GvR/__SMClub__/__GvR_Python"""

Name: Anonymous 2011-01-02 23:59

>>10
RAAAAGE

Name: Anonymous 2011-02-03 6:59

Don't change these.
Name: Email:
Entire Thread Thread List