Search:
Type: Posts; User: loves_oi
Search:
Search took 0.04 seconds.
-
3 processes run this task. When process A runs wait(), does process A blocked until both B and C run wait() and semaphore becomes zero ?
-
Hi, i'm wondering the bahaviour of the following code fragment. Assume that, firstly process A will invoke wait(), then B, and then C.
semaphore s=3;
while(1)
{
s.wait();
-
Hello, i need to write such a code that, three processes will run concurrently, namely all 3 of them should be at the same region at the same time.
The task looks like something like that:
Task...
-
November 9th, 2012, 02:16 PM
I'm using cout to print lots of lines. But i want to put together them in one variable etc. Then , i want to print it.
I think i can do it with ostream but I cant do it . Is there anybody to give...
-
September 23rd, 2012, 06:33 AM
template<class T>
class Convert
{
T data;
public:
Convert(const T& tData = T()) : data(tData)
{ }
template<class C>
bool IsEqualTo( const C& other ) const
-
November 6th, 2011, 07:14 AM
I have the below main .
int main(void)
{
try{
Product p1("makarna", "gida", 1,9 );
Product p2("peynir", "gida", 3,4 );
Product p3("peynir", "gida", 3,10 );
Product p4("cif",...
-
November 5th, 2011, 03:08 AM
this is my header file
#ifndef HW1_H
#define HW1_H
#include <iostream>
#include <string>
#include <vector>
using namespace std;
-
October 29th, 2011, 03:44 PM
i spend one hour for it . But i forgot a small point :( i found thanks to God. I forgot including Product class. After including, it worked. Thanks for your interest
-
October 29th, 2011, 02:23 PM
Product Store::getProduct(int index)
{
int indexim=0;
vector<Product>::iterator it;
for ( it=(this->availableProducts.begin()) ; it < (this->availableProducts.end()); it++,indexim++ )
{...
-
October 20th, 2011, 09:24 AM
This is the header and it's forbidden to make any change in header.
class Product
{
private:
-
October 20th, 2011, 09:17 AM
no,there arent. all is mutator
-
October 20th, 2011, 09:01 AM
Ok. second option is worked. BUt now i want to reach shoppingList vector.It's type of productClass
and Product class is
class Product
{
private:
string productName;
-
October 20th, 2011, 07:43 AM
class Order /* It is forbidden to change here*/
{
private:
string orderID;
int orderDate;
string customerID;
string storeName;
vector<Product> shoppingList;
-
October 20th, 2011, 05:40 AM
ok. then how can i print the items which exist in the vector with the help of a function?
-
October 19th, 2011, 04:03 PM
#include <vector>
#include <iostream>
class Product
{
private:
string productName;
string productType;
-
August 23rd, 2011, 05:24 PM
ok. I understand. Thanks a lot.
-
August 23rd, 2011, 08:32 AM
Interestingly , No it is not a mistake .When i compile and run with this:
memcpy(snacks.ncandy[0].bar_name, &MyChocolate, sizeof(candybar));
outputs is:
-
August 23rd, 2011, 02:25 AM
-
August 22nd, 2011, 05:47 PM
I study the code which is Paul McKenzie's last post and add only couts at last. That's it:
#include <cstring>
#include <iostream>
int main()
{
using namespace std;
struct candybar
-
August 22nd, 2011, 04:36 PM
Thanks for all replies . You informed me very well.
-
August 21st, 2011, 08:15 AM
No , it shouldn't because in my first thread(i copy paste below) , p is an allocated pointer and q is not an allocated pointer. Both of them doesn't equal Null when i run the program.The output is...
-
August 21st, 2011, 07:33 AM
I am trying to understand this code.I find it from the web and copy paste directly. The comments are not mine.
I want you to focus on insert function firstly.
int create(struct node *p, int...
-
August 21st, 2011, 07:15 AM
I understand in this way from your words:
We take space from memory randomly. Thus p is most probably Not NULL but it can be Null ( the possibility of being Null is very low) .
We don't...
-
August 21st, 2011, 06:44 AM
#include <stdio.h>
#include <conio.h>
struct node
{
int num;
struct node *next;
};
-
April 5th, 2011, 02:48 AM
the first one doesn't change the value of myKnap.W .
i have tried the second one and fixed some deficient point in your code. It should be correct.
#include<iostream>
using namespace std;...
|
Click Here to Expand Forum to Full Width
|