#include <stdio.h>
void main ()
{
char *near_title = "Jamsa's 1001 C & C++ Tips";
char far *far_title = "Jamsa's 1001 C & C++ Tips";
printf("The book's title: %Ns\n", near_title);
printf("The book's title: %Fs\n", far_title);
}
谁能解释一下是什么意思啊 %Ns\n %Fs\n char *near_title char far *far_title
都读一下把 谢谢了
----------------解决方案--------------------------------------------------------
N,F应该都是一个值(可以相同也可以不同);表示打印出的字符串的字符个数;
----------------解决方案--------------------------------------------------------
忘了说了,N,F应该都是由宏定义的.
----------------解决方案--------------------------------------------------------
结果是
The book's title:Jamsa's 1001 C & C++ Tips
The book's title:Jamsa's 1001 C & C++ Tips
还是不明白啊
----------------解决方案--------------------------------------------------------
#include <stdio.h>
void main ()
{
char *near_title = "Jamsa's 1001 C & C++ Tips";
//near 指针,近指针
char far *far_title = "Jamsa's 1001 C & C++ Tips";
//far 指针,远指针
printf("The book's title: %Ns\n", near_title);
printf("The book's title: %Fs\n", far_title);
}
----------------解决方案--------------------------------------------------------
啊还有远指针近指针啊
----------------解决方案--------------------------------------------------------
I am sorry I make a mistake.
----------------解决方案--------------------------------------------------------
版主,能不能告诉俺们远近指针有啥区别吗,
除了输出时用%Ns和%Fs外?
----------------解决方案--------------------------------------------------------
还是不明白 书上找不到 我郁闷
----------------解决方案--------------------------------------------------------