/* SCANF.C: This program uses the scanf and wscanf functions * to read formatted input. */#include <stdio.h>void main( void ){ int i, result; float fp; char c, s[81]; wchar_t wc, ws[81]; printf( "\n\nEnter an int, a float, two chars and two strings\n"); result = scanf( "%d %f %c %C %s %S", &i, &fp, &c, &wc, s, ws ); printf( "\nThe number of fields input is %d\n", result ); printf( "The contents are: %d %f %c %C %s %S\n", i, fp, c, wc, s, ws); wprintf( L"\n\nEnter an int, a float, two chars and two strings\n"); result = wscanf( L"%d %f %hc %lc %S %ls", &i, &fp, &c, &wc, s, ws ); wprintf( L"\nThe number of fields input is %d\n", result ); wprintf( L"The contents are: %d %f %C %c %hs %s\n", i, fp, c, wc, s, ws);}
引用第1楼wangfan于2008-05-10 11:39发表的 :int i, result; float fp; char c, s[81]; wchar_t wc, ws[81];.......
引用第4楼zhaofei于2008-05-10 11:42发表的 :我是问你这个C有问题没有 关我的代码什么事?这不是我的代码,这是MSDN上的例子,有本事去鄙视微软的程序员啊!!!!fuck!
我晕,提意见还骂人,连看都看不出来,也知道你风格到底什么样子了,什么事情都是从小事情开始导致的风格不好导致的问题你难道没经历过吗,难道不是问题吗?你转行吧,这行不适合你
多少次,流云飞舞,恍惚重现,你当年青春曼妙一瞬间,情意满天,纷飞笼罩,深不见底的寂寥