我们知道这endl是操纵器,在内部它放入'\n'缓冲区然后刷新缓冲区.在哪里endl定义?什么是endl宏,函数或变量,类或对象?我怎样才能定义自己的endl操纵器?
cout << "hello" << endl ; /*what is endl and where it is defined */
Run Code Online (Sandbox Code Playgroud) int execle(const char *path, const char *arg, ..., char * const envp[]);
Run Code Online (Sandbox Code Playgroud)
在Linux上使用的函数原型中,在变量参数之后,它们使用了在C语言中不可能的命名变量.因为在变量参数后的变量函数的C语言中我们不能传递命名参数然后为什么在上面给出的函数中他们在变量argument(...)之后使用了命名参数.
在路径中的linux源代码中出现的head.s文件中arch/i386/kernel/head.S,ALIGN使用如下面的ret指令后面给出的代码片段中所示.我的问题是这是什么ALIGN,根据我的知识,这不是指令,而不是汇编指令,那么这是什么以及为什么在这里使用它?
您可以获得head.S以下网站的代码:
http://kneuro.net/cgi-bin/lxr/http/source/arch/i386/kernel/head.S?v=2.4.0
路径: arch/i386/kernel/head.S
/*
* We depend on ET to be correct. This checks for 287/387.
*/
check_x87:
movb $0,X86_HARD_MATH
clts
fninit
fstsw %ax
cmpb $0,%al
je 1f
movl %cr0,%eax
xorl $4,%eax
movl %eax,%cr0
ret
ALIGN /* why ALIGN is used and what it is? */
1: movb $1,X86_HARD_MATH
.byte 0xDB,0xE4
ret
Run Code Online (Sandbox Code Playgroud)