No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
can any one explain about the below code which is Dining Philosophers Problem.. [CODE] //Dining Philosophers Problem import java.util.Random; class Monitor { int phil_States[] = new int[5]; // 0=not_waiting, 1=waiting // 2=eating boolean fork_States[] = new boolean[5]; // false = in use, true = free Monitor() { // constructor for(int … |
|
Hello I am writing a class Test. I considered a field “int age” to see how long each instance of this class has been created. In other words i want to know the age of each instantiated object of this class. I assumed i should use the Timer class. I … |
|
Hello, I am writing a program in c# that should convert postcodes to the corresponding coordinates. I assume there should be a sort of database,maybe gps coordinates data base, but i do not know how to access them. On the other hand i see that there are some websites that … |
|
hi..iv created a table and placed labels in every row of the table.... when i run it,all the labels misplace in the page as if they have not placed in the rows... what should i do? i have another question about the size of a the page... what size it … |
|
after finishing while loop,when it wants to quit the recursive( node curr) method,it comes back again to the recursive call(recursive (nod)) in the for loop and it traps in several loops till an exception occurs saying that "index was out of the rang of the array" . can anyone help … |
|
here is a code about a circularlinklist,which its nodes contain a number between 1 to 2048(first node contains 1 and the lastnode contains 2048) and pointer P that refers to the last node...what does this code do? [code]while(p->next!=p){ p->next=p->next=->next; p=p->next; } cout<< p->info;[/code] |
|
I want to search a name in my doubly linkedlist and remove it. I used strcmp(string1/string2) to see if the data part of the current node is the same as the data im looking for or not.but it didnt work. what can i do? [CODE] class node { friend class … |
|
iv written a code that insert a node befor a node containing a certain value(for example insert a node having value 3,befor the node containing value5),i checked the code many times,i couldnt find any mistake, but the compiler errors this part. can any one help. here is the code : … |