且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为此问题提供C ++代码

更新时间:2023-02-14 21:18:46

如果要发布作业,至少要使其看起来像是您自己尝试做某事!

我们不做您的作业:这是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试一下,或者学一下神奇的单词:您要用它炸薯条吗?"
If you are going to post your homework, at least try to make it look like you have attempted to do something yourself!

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, or learn the Magic Words: "Do you want fries with that?"


您的意思是为此问题提供C ++代码 "?
没有什么比这更容易了!

Do you mean "provide C++ code for this question"?
Nothing could be easier!

#include <iostream>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
    cout << "Write a program to model the producer consumer problem. " << 
    "The producer has a fixed buffer size and cannot produce when it is full. " <<
    "On the other side, the consumer consumes form a fixed buffer size that is fed by the producer. " <<
    "The consumer cannot consume from an empty buffer.";
}



注意:问题的精确表述至关重要.

—SA



Note: precise formulation of Question can be critically important.

—SA