两个程序要互换数据,是不是用管道解决最好?相关知识在什么书里面有介绍啊

两个程序要交换数据,是不是用管道解决最好?相关知识在什么书里面有介绍啊?
从一个程序输出一个字符窜,然后这个字符窜就是下一个程序的输入。
怎么用管道来解决这个问题,相关知识在什么书里面有啊?
一般C语言书没有这个介绍,是不是windows socket 会有这方面的介绍?

------解决方案--------------------
两个程序(进程)要交换数据,实际上就是进程间通讯。常用的进程间通讯的基本方式有:
1. 管道
2. 共享内存
3. 信号量
4. 消息队列

当然,还有其他一些进程间通讯方式(不同的操作系统平台上)。比如用socket...

去找一本书,如果其中讲了进程间通讯,肯定会讲到管道的。

------解决方案--------------------
管道,共享内存,消息队列,socket等都很好用,要学的话就直接找本linux编程开发的书,上面对这些都讲解的非常透彻。
最好用的我感觉是管道和socket,不过共享内存的效率应该是最高的。

------解决方案--------------------
查MSDN是Windows程序员必须掌握的技能之一。
mk:@MSITStore:H:\MSDN98\98VS\2052\winbase.chm::/devdoc/live/pdwbase/ipc_8elv.htm
About Interprocess Communications
As computer users become more sophisticated, they demand more power from the applications they use. To meet this demand, developers add more features to the applications, and the applications become larger. Large applications eventually become unmanageable, both from a development standpoint and from a user-interface standpoint. 

One method you can use to manage larger applications is to produce a specialized application that provides a limited number of features, then enable it to communicate and share data with other specialized applications using some form of IPC. It is not necessary for a single application meet all its users' expectations; applications can communicate and cooperate. 

The following IPC mechanisms are supported by the Win32 API: 

Clipboard 
COM 
Dynamic Data Exchange (DDE) 
File Mapping 
Mailslots 
Pipes 
RPC 
Windows Sockets 
WM_COPYDATA