Linux下C++类的线程函数
最近在用C++编写一个RTSP的客户端,由于要用到线程,根据C编程的经验,写了如下代码:
class LiRtspSession
{
public:
void* MainThreadFunc(void* pvData);
void* AudioProcThreadFunc(void* pvData);
void Connect();
//省略的代码
private:
pthread_t m_hProcHandle, m_hAudioProcHandle;
//省略的代码
};
void LiRtspSession::Connect()
{
//create main thread creating rtsp session and receiving rtp/rtcp packet
int ret = pthread_create(&m_hProcHandle, NULL, MainThreadFunc, this);
if(ret != 0)
{
return;
}
//create a thread receiving audio data
if(m_bAudioEnabled && m_eProtoType == ptUDP);
{
ret = pthread_create(&m_hAudioProcHandle, NULL, AudioProcThreadFunc, this);
if(ret != 0)
{
return;
}
}
pthread_join(m_hProcHandle, NULL);
if(m_bAudioEnabled && m_eProtoType == ptUDP);
{
pthread_join(m_hAudioProcHandle, NULL);
}
}
但是在编译时却出现如下错误:
LiRtspSession.cpp: In member function ‘void LiRtspSession::Connect()’:
LiRtspSession.cpp:176: error: argume
相关文档:
系统环境:Windows 7
软件环境:Visual C++ 2008 SP1 +SQL Server 2005
本次目的:编写一个航空管理系统
这是数据库课程设计的成果,虽然成绩不佳,但是作为我用VC++ 以来编写的最大程序还是传到网上,以供参考。用VC++ 做数据库设计并不容易,但也不是不可能。以下是我的程序界面,后面 ......
我之前是一个C程序员,而且是个Windows的程序员,在windows下使用VC6.0/VS2005等microsoft的傻瓜式工具工作,
对于那个vc 6.0/vs2005的快捷操作,debug操作是那么的熟悉,可以说vc
6.0/vs2005是window下开发c/c++最好用的工具了,可以查看调用堆栈,内存变化情况,变量值,另外安装 visual assist
x后让VC看起来是那么 ......
linux目录架构
/ 根目录
/bin 常用的命令
binary file 的目錄
/boot 存放系统启动时必须读取的档案,包括核心
(kernel) 在内
/boot/grub/menu.lst GRUB设置
/boot/vmlinuz 内核
......