Sunday, July 12, 2009

I'm using Bloodshed Dev C++ and I cant get the scanf function to work- any ideas? (printf does work)?

Correct format?





int day, year;


char weekday[10], month[12];





scanf( "%s %s %d %d", weekday, month, %26amp;day, %26amp;year );


1 comment:

  1. huh?? thats wrong... what are you trying to input?? judging by your scanf line..

    scanf("%c %c %d %d",&weekday,&month,...);

    %c is used for characters
    and there MUST be a & sign before each variable.
    there shud not be any semicolons in that statement

    ReplyDelete