救命啊!在线等!!

GGPPRRSS88223311 2008-10-17 11:37:40
1. list as many as possible the thread and process synchronization primitives you know of on UNIX and Windows. Briefly explain what they are and what situations they are most suited for??
2. how do you use object reference count to manage object’s lifetime in a multi-thread application??
3. what's the difference between passing parameters by value and passing parameters by reference? write a function that allocates a new chunk of memory and returns the allocated memory to the caller VIA A PARAMETER??
4 4. assume x is an STL iterator. Explain why generally postfix form of increment operation on x, ie., x++, is less efficient than the prefix form of the operation, i.e., ++x??
...全文
63 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
ViCross 2008-10-17
  • 打赏
  • 举报
回复
LZ 好像都没讲清楚想干什么.
要翻译呢还是解释
e_sharp 2008-10-17
  • 打赏
  • 举报
回复
4. postfix比prefix多使用了一个临时对象

iterator& operator++() { //prefix
...//++
return *this;
}

iterator operator++(int) { //postfix
iterator tmp = *this;
...//++
return tmp;
}
feng4206yu 2008-10-17
  • 打赏
  • 举报
回复
翻译如下:
1.尽可能多的列举你知道的在Unix和Windows上的线程和队列中的同步基元,并简略的解释他们是什么以及适用于什么情形?
2.在一个多线程应用程序中你如何通过对象引用的使用来控制对象的生命期
3.传值调用参数和和引用参数的区别是什么?写一个要求一个参数的函数,返回内存分配的地址指针..
4.假设X是一个STL指针,请解释一下为什么自增后缀的操作X++的效率要比自增前缀的操作++X低
应该没有错吧,搬个凳子坐着看....
帅得不敢出门 2008-10-17
  • 打赏
  • 举报
回复
救命啊 怎么都是E文
  • 打赏
  • 举报
回复
感觉题目很不错!不过,我不会答!

64,282

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧