473,395 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

circular link list in c++

69
I'm trying to built and array of circular link list but when I read the input file Ijust get a long link list instead of different list and after trying to use Linked_list_Stack *obj[arraysize]; I'm getting this errors
newcir.cpp:107: request for member `push' in `obj[i]', which is of
non-aggregate type `Linked_list_Stack*'
newcir.cpp:110: request for member `print_list' in `obj[i]', which is of
non-aggregate type `Linked_list_Stack*'
Oct 20 '06
103 15845
saraSS
69
yes I did thanks I'm gonna work on the evaluation now let you know what else is wrong lol ;)
Oct 22 '06 #51
saraSS
69
ok I'm back to the circular lists how can I name my circular lists (from a to z) for easy manipulation of the lists like when I'm doing the postfix evaluation I refer to "a" and "b" instead of the whole list ?
Oct 23 '06 #52
arne
315 Expert 100+
ok I'm back to the circular lists how can I name my circular lists (from a to z) for easy manipulation of the lists like when I'm doing the postfix evaluation I refer to "a" and "b" instead of the whole list ?
You could define a header struct which holds this info (i.e. an identifier) and the reference to the list. Your vector would then be no more a vector of lists, but a vector of these headers structs.
Oct 23 '06 #53
saraSS
69
how do I do that? example please
Oct 23 '06 #54
saraSS
69
struct headernode{
char x;
listNodeType *next;
};

then in main
char listname = 'a';
ListClass ListA[arraysize];
headernode header[arraysize];

then in m while loop
header[i].x=listname++;
header[i].next=ListA[i];

but error lol
mycirlist.cpp:329: cannot convert `ListClass' to `listNodeType*' in assignment
Oct 23 '06 #55
saraSS
69
should I use the same node I have for the list ?
Oct 23 '06 #56
arne
315 Expert 100+
should I use the same node I have for the list ?
Yes the member of the header struct shoud have type 'struct node' (or how you called the type of a list element). It is the entry point to the list.
Oct 23 '06 #57
saraSS
69
I have a class node for the list like this
class ListNodeClass
{
private:
ItemType Info;
ListNodeClass * Next;
public:
// First, the constructor:
ListNodeClass(const ItemType & Item, ListNodeClass * NextPtr = NULL):
Info(Item), Next(NextPtr)
{
};
void GetInfo(ItemType & TheInfo) const;
friend class ListClass; // very convenient to allow this
};
Oct 23 '06 #58
arne
315 Expert 100+
I have a class node for the list like this
class ListNodeClass
{
private:
ItemType Info;
ListNodeClass * Next;
public:
// First, the constructor:
ListNodeClass(const ItemType & Item, ListNodeClass * NextPtr = NULL):
Info(Item), Next(NextPtr)
{
};
void GetInfo(ItemType & TheInfo) const;
friend class ListClass; // very convenient to allow this
};
Ok, if that's the type of the nodes, use a pointer to such a class as the entry to the list in your header struct. Since the list is circular (is it?), you can let it point to an arbitrary element.
Oct 23 '06 #59
saraSS
69
how do I do this? pointers are not my good subjets lol
Oct 23 '06 #60
arne
315 Expert 100+
how do I do this? pointers are not my good subjets lol
But you had it already (almost):

Expand|Select|Wrap|Line Numbers
  1. struct headernode{
  2.         char x;
  3.         listNodeType *next;
  4. }; 
  5.  
Replace listNodeType by ListNodeClass. Note that you have to change all access to a list, since you have an array of header structs now...
Oct 23 '06 #61
saraSS
69
going in circles here cant make it work with those pointers another way to do that?
Oct 23 '06 #62
arne
315 Expert 100+
going in circles here cant make it work with those pointers another way to do that?
Since the vector has a constant number of elements, you could establish some mapping:

a is 0
b is 1
c is 2 and so on.

If you need set b, you know its the second (index 1) in your vector. But do not change the vector then or you will run in trouble ;-)

Alternatively, you could extend your nodes by another member. Instead of storing the identifier in a header you can store it in every node of the list. This is somewhat ugly, but you can go on with your current design ...
Oct 23 '06 #63
saraSS
69
I dont know nothing is working
Oct 23 '06 #64
saraSS
69
class ListNodeClass
{
private:
ItemType Info;
ListNodeClass * Next;
public:
// First, the constructor:
ListNodeClass(const ItemType & Item, ListNodeClass * NextPtr = NULL):
Info(Item), Next(NextPtr)
{
};
void GetInfo(ItemType & TheInfo) const;
friend class ListClass; // very convenient to allow this
};

struct headernode
{
char x;
ListClass *next;
};

class ListClass
{
private:
ListNodePtr GetNode(const ItemType & Item,
ListNodePtr NextPtr = NULL);
void FreeNode(ListNodePtr NodePtr);
void ClearList();
// Next 3 are sometimes made into protected fields:
ListNodePtr Front, Rear;
int Count;
public:
// constructor:
ListClass();
// destructor:
~ListClass();
int NumItems() const;
bool Empty() const;
void InsertRear(const ItemType & Item);
void printing();
ItemType RemoveFront();
ListNodePtr Find(const ItemType & Item) const;

};
int main()
{
int i,m;
char postfix[80];
char listname = 'a';

cin>>arraysize;
ListClass ListA[arraysize],*L;
L=ListA;
for( i = 0; i <arraysize; i++ )
{
while(cin>>number && number!=-1)
{
ListA[i].InsertRear(number);
}
cout<<ListA[i].NumItems()<<" ";
ListA[i].printing();
cout<<endl;
}
return 0;
}

this is almost what I have now and but cant make it work dont know why?and I have tried everyway you told me what I'm doing wrong
Oct 23 '06 #65
arne
315 Expert 100+
this is almost what I have now and but cant make it work dont know why?and I have tried everyway you told me what I'm doing wrong
I have now used your code for a slim version. It's implementing a singly-linked, non-circular(!) list. All you can currently do is adding elements and print the content of the Info member.

Use this as a starting point. Extend the list with all features you need (circularity, removing nodes, ...).

Hope this is helpful :)


Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. #define ItemType int
  7.  
  8. // the definition of a list node
  9. class ListNodeClass
  10. {
  11. public:
  12.     // the data of a node
  13.     ItemType Info;
  14.  
  15.     // the pointer to the next node
  16.     ListNodeClass *Next;
  17. };
  18.  
  19.  
  20. // the definition of a list (header!)
  21. class ListClass
  22. {
  23. private:
  24.         // entry to the list
  25.     ListNodeClass *Front;
  26.  
  27.     // number of elements
  28.     int Count;           
  29.  
  30.     // the ID to identify the set
  31.         char ID;  
  32.  
  33.     void FreeNode( ListNodeClass* );
  34.  
  35. public:
  36.     ListClass( char id ) : Front(0), Count(0), ID(id) {}
  37.  
  38.     void InsertFront( ListNodeClass& );
  39.     void InsertRear( ListNodeClass& );
  40.  
  41.     void RemoveFront();
  42.  
  43.     void ClearList();
  44.     int NumItems() const { return Count; }
  45.     bool Empty() const;
  46.     void Printing();
  47.  
  48.     ListNodeClass* Find(const ItemType & Item) const;
  49.  
  50. };
  51.  
  52. void ListClass::InsertFront( ListNodeClass& node ) {
  53.  
  54.     node.Next = Front;
  55.     Front = &node;    
  56.     Count++;
  57. }
  58.  
  59. void ListClass::Printing() {
  60.  
  61.     ListNodeClass *ptr = Front;
  62.  
  63.     cout << "This is set " << ID << " (" << Count << " elements): ";
  64.  
  65.     while( ptr!=NULL ) {
  66.  
  67.         cout << ptr->Info << " ";
  68.         ptr = ptr->Next;
  69.     }
  70.  
  71.     cout << endl;
  72. }
  73.  
  74. int main( void )
  75. {
  76.     ListNodeClass *node;
  77.  
  78.     // list a
  79.     ListClass list_a( 'a' );
  80.  
  81.     node = new ListNodeClass;
  82.     node->Info = 21;
  83.     list_a.InsertFront( *node );
  84.  
  85.     node = new ListNodeClass;
  86.     node->Info = 33;
  87.     list_a.InsertFront( *node );
  88.  
  89.     list_a.Printing();
  90.  
  91.     // list b
  92.     ListClass list_b( 'b' );
  93.  
  94.     node = new ListNodeClass;
  95.     node->Info = 3;
  96.     list_b.InsertFront( *node );
  97.  
  98.     node = new ListNodeClass;
  99.     node->Info = 2;
  100.     list_b.InsertFront( *node );
  101.  
  102.     node = new ListNodeClass;
  103.     node->Info = 1;
  104.     list_b.InsertFront( *node );
  105.  
  106.     list_b.Printing();
  107.  
  108.     return 0;
  109. }
  110.  
Oct 23 '06 #66
saraSS
69
thanks gonna try that
Oct 23 '06 #67
saraSS
69
looks like we were trying the same thing
I add 1 to the arraysize and try to put the letter in the first node but getting like 9 10 11 12 13 14 instead of a b c d e f how can I fix that? this is what I did

char listname = 97;

ListClass ListA[arraysize+1];

for( i = 1; i <arraysize+1; i++ )
{
while(cin>>number && number!=-1)
{
ListA[0].InsertRear((int)listname++);
ListA[i].InsertRear(number);
}
cout<<ListA[i].NumItems()<<" ";
ListA[i].printing();
cout<<endl;
}
but getting
1st column the number of elemets of every cirlist
2nd is supose to be the a b c d e f
after that is every list
10 9 1 3 5 7 9 11 13 15 17 19
10 10 2 4 6 8 10 12 14 16 18 20
20 11 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
7 12 0 3 6 9 12 15 18
7 13 1 4 7 10 13 16 19
7 14 2 5 8 11 14 17 20
Oct 23 '06 #68
saraSS
69
I try 'a' instead of 97 and got the same also
Oct 23 '06 #69
arne
315 Expert 100+
I try 'a' instead of 97 and got the same also
You try to store the list's identifier in a list element? Why? That's what the header struct (ListClass) is for. It stores the number of elements and the ID. The list nodes should only store the 'data' (Info member) and the 'Next' node pointer. When printing the list, you get the ID and the number of elements from the ListClass and the data from the ListNodeClass. Please have a look on the code I posted.

Or did I get you wrong?
Oct 24 '06 #70
saraSS
69
It looks like I get that wrong also I need an x where x is a lower-case symbol in the range ‘a’ . . . ‘z’ to indicate that a copy should be made of an input set. This copy will be an ordered singly-linked circular list with a header. A pointer to the header of the cloned list is to be pushed to the stack. ‘a’ indicates that the first
input set should be copied, ‘b’ indicates that the second input set should be copied, and so on.
Oct 24 '06 #71
arne
315 Expert 100+
It looks like I get that wrong also I need an x where x is a lower-case symbol in the range ‘a’ . . . ‘z’ to indicate that a copy should be made of an input set. This copy will be an ordered singly-linked circular list with a header. A pointer to the header of the cloned list is to be pushed to the stack. ‘a’ indicates that the first
input set should be copied, ‘b’ indicates that the second input set should be copied, and so on.
You mean you don't understand this or your implementation doesn't work?
Oct 24 '06 #72
saraSS
69
I did not understand this part before and was trying something harder that what is suppose to be but the pointer thing still messing me up
Oct 24 '06 #73
saraSS
69
what I'm trying to do now is a stackclass where i'm gonna have all the fuction to use with the stacklike this
class stackClass
{
public:
stackClass();// constructor:
~stackClass();// destructor:
void Initialize();
void SetExpression(char *str);
void Push(char c);
char Pop();
void Evaluate();
};

and when I'm evalueting the expression I check for the letter and make a copy
'maybe'
l=strlen(eval);
ListNodePtr tmp;
for(i=0;i<l;i++)
{
if(eval[i]>=97 && eval[i]<=122)
{
//tmp=CopyList(eval[i]);
Push(eval[i]);
cout<<eval[i];
}
else
{
A=Pop( );
B=Pop( );
switch(eval[i])
{
case 'U': break;
case 'I': break;
case '-': break;
}
what do you thing?
Oct 24 '06 #74
arne
315 Expert 100+
what I'm trying to do now is a stackclass where i'm gonna have all the fuction to use with the stacklike this
I think you're trying to write too much code on your own. As far as I can see the assignment does not prevent you from using the std::stack from STL, does it? So, you don't have to implement a stack class on your own, it's already there!
Oct 24 '06 #75
saraSS
69
how can I do that ? the easy way then?
Oct 24 '06 #76
arne
315 Expert 100+
how can I do that ? the easy way then?
Here comes an example on how to use a stack. You can insert it at the end of the program I posted some posting ago ... you know, the one with list_a and list_b ...

Expand|Select|Wrap|Line Numbers
  1.     ListClass *tmp_list_ptr;
  2.  
  3.     // define a std::stack
  4.     stack<ListClass *> op_stack;
  5.  
  6.     // get the number of elems on the stack
  7.     cout << "Stack elements:" << op_stack.size() << endl;
  8.  
  9.     // push elems onto the stack
  10.     op_stack.push( &list_b );
  11.     op_stack.push( &list_a );
  12.  
  13.     cout << "Stack elements after 2x push:" << op_stack.size() << endl;
  14.  
  15.     // get the top element
  16.     tmp_list_ptr = op_stack.top();
  17.     cout << "No. of elems in top list: " << tmp_list_ptr->NumItems() 
  18.          << endl;
  19.     cout << "Stack elements after top():" << op_stack.size() << endl;
  20.  
  21.     // remove the top element
  22.     op_stack.pop();
  23.     cout << "Stack elements after pop():" << op_stack.size() << endl;
  24.  
Oct 24 '06 #77
saraSS
69
good gonna try that thanks
Oct 24 '06 #78
saraSS
69
Your example looks look but does not work with my array of circular list or at least I dont know how to make it work so stuck again but i guess everybody in my class is having problem because we got more time I'm gonna try to leave the array in main just to create the set of circular list and in my funtion evaluation want to do the expresion evaluarion as a stack based postfix
like this
int main()
{
ListNodeClass *node;
ListClass *tmp_list_ptr;
int i;

cin>>arraysize;
ListClass list[arraysize];

for(i=0;i<arraysize;i++)
{
while(cin>>number && number!=-1)
{
node = new ListNodeClass;
node->Info = number;
list[i].InsertFront(*node);
}
cout<<list[i].NumItems()<<" ";
list[i].Printing();
cout<<endl;
}
Evaluate();

return 0;
} and for the evaluation

void Evaluate()
{
int i,l,A,B,Q,Z;
char postfix[80];
stack<ListClass *> op_stack;
ListNodeClass *tmp,*e[arraysize];

cin.getline (postfix,80);
SetExpression (postfix);
cout<<"ok";
puts(postfix);
cout<<"ok";
strcpy(eval,postfix);
cout<<"ok";
puts(eval);
cout<<"ok";
l=strlen(eval);
for(i=0;i<l;i++)
{
if(eval[i]>=97 && eval[i]<=122)
{
e=eval[i];
tmp=CopyList(e[i]);
op_stack.push(eval[i]);
cout<<eval[i];
}
else
{
switch(eval[i])
{
case 'U': break;
case 'I': break;
case '-': break;
//case '\'' : break;
case '<' : break;
case '&' : break;
case '|' : break;
case '!' : break;
}
//op_stack.push(Q);
}
}
op_stack.pop();
} but getting some errors
dont know what to do
?
Oct 25 '06 #79
arne
315 Expert 100+
So, as far as I understand. If you got all things running (i.e. the creation of the array with the singly-linked circular list), you start to evaluate the expression by scanning it and performing the required action.

So for the sample expression abcdefUUUUIabIacIadIaeIafIUUUU= from your assignment, you push pointers to the lists (IMHO it would be sufficient to use the list identifier, but anyway) onto your stack, so if you reach the first 'U', your stack should look like

f e d c b a

with the top element on the left.

U means set union, so you got to unite the top 2 elements (i.e. lists on your stack). The result is the new top element, so after the U the stack looks like

f+e d c b a

I would say (correct me if I get things wrong here).

So, what you need to do technically is to invoke a routine to unite two lists :-) You may also need to allocate some result list, where you store the temporary result of the last operation (for the f+e list in the example above). The pointer to this temp result is pushed onto your stack.

The lists in your array should not be changed as they're needed for reference in later operations ...
Oct 26 '06 #80
saraSS
69
yes every set needs to be a circular list
Oct 26 '06 #81
saraSS
69
the circular lists are working, to have a pointer for every one of them so I can make a copy of the list and evaluate some expression with the list in a postfix stack based way
Oct 27 '06 #82
saraSS
69
the pointer to the list are the ones not working I need some help with that
Oct 27 '06 #83
arne
315 Expert 100+
the pointer to the list are the ones not working I need some help with that
Sure, if I can do it. Anything particular you have problems with?
Oct 27 '06 #84
saraSS
69
yes, I need to read the last line in my input file, and with that line if I have an "a" I need to make a copy of the first circular list and after that push it into the stack I have this fuction but not working think because i need a pointer or something

int main()
{
int i,m;
char postfix[80];
char listname = 97;

cin>>arraysize;
ListClass ListA[arraysize],L[arraysize];


for(i=0;i<arraysize;i++)
{
while(cin>>number && number!=-1)
{
ListA[i].InsertRear(number);
}
cout<<ListA[i].NumItems()<<" ";
ListA[i].printing();
cout<<endl;
}
Initialize ( );
cin.getline(postfix,80,'\n');
SetExpression (postfix);
cout <<postfix<< endl;
puts(postfix);
cout<<"ok";
strcpy(eval,postfix);
m=Evaluate( );
printf("answer: %d", m );
return 0;
}in main and function is

int Evaluate()
{
int i,l,A,B,Q,Z;
l=strlen(eval);

for(i=0;i<l;i++)
{
if(eval[i])
{
Push(eval[i]);
}
else
{
A=Pop( );
B=Pop( );
switch(eval[i])
{
case 'U': break;
case 'I': break;
case '-': break;
case '\'' : break;
case '<' : break;
case '&' : break;
case '|' : break;
case '!' : break;
}
Push(Q);
}
}
Z=Pop( );

return Z;
}
Oct 27 '06 #85
arne
315 Expert 100+
yes, I need to read the last line in my input file, and with that line if I have an "a" I need to make a copy of the first circular list and after that push it into the stack I have this fuction but not working think because i need a pointer or something
Hmm. As far as I understand, you don't need to make a copy of the list and push it on the stack. Just push pointers (or even symbols!) on the stack. Suppose the last line, i.e. the postfix expression, looks like

a b U

This means

push a on the stack
push b on the stack
unite, i.e. pop the top element from the stack, pop the top element from the stack (2 times!) and unite it.
push the result on the stack.

It is sufficient to push the symbol/pointer on the stack and to get the list content if you really need it, i.e. for the unite operation. Hence, for every operation you need a function which receives one or two symbols/pointers (the two symbols a and b in our example), fetches the list(s) contents from the array and performs the oeration. Afterwards the result has to be pushed on the stack. For this temporary result you need an additional list (and symbol/pointer!).

So, you don't have to push copies of the list on the stack, just pointers or symbols. This is much more efficient. Consider the example:

a a a a a a a ...

you would make several copies of the list a, but if you only use the pointer/symbol you save a lot of space and lose no information. You know what I mean?
Oct 28 '06 #86
saraSS
69
yes I know what you mean but I dont know how to do the pointer part I have tried some thing like
ListClass ListA[arraysize],*L; and this ListClass ListA[arraysize],*L[arraysize];

but nothing works pointing to every set is my problem
Oct 28 '06 #87
arne
315 Expert 100+
yes I know what you mean but I dont know how to do the pointer part I have tried some thing like
ListClass ListA[arraysize],*L; and this ListClass ListA[arraysize],*L[arraysize];

but nothing works pointing to every set is my problem
I am not sure what you're trying to do here. The ListA is the array for the circular lists? What about the stack? Do you try to use the STL stack?

Can you explain that in more detail?
Oct 29 '06 #88
saraSS
69
I think I got the pointer part working but now looks like I'm not reading the last line of my input file (last line is the one with the expression)to do the evaluation

int main()
{
int i,m;
char postfix[80];
cin>>arraysize;
ListClass ListA[arraysize];


for(i=0;i<arraysize;i++)
{
while(cin>>number && number!=-1)
{
ListA[i].InsertRear(number);
}
cout<<ListA[i].NumItems()<<" ";
ListA[i].printing();
cout<<endl;
}
Initialize ( );
cin.getline(postfix,80);
cout<<postfix<<endl;
Evaluate(ListA,postfix);

return 0;
}

what I'm doing wrong think my while loop is using all the lines ?
idont know
Oct 29 '06 #89
arne
315 Expert 100+
I think I got the pointer part working but now looks like I'm not reading the last line of my input file (last line is the one with the expression)to do the evaluation

int main()
{
int i,m;
char postfix[80];
cin>>arraysize;
ListClass ListA[arraysize];


for(i=0;i<arraysize;i++)
{
while(cin>>number && number!=-1)
{
ListA[i].InsertRear(number);
}
cout<<ListA[i].NumItems()<<" ";
ListA[i].printing();
cout<<endl;
}
Initialize ( );
cin.getline(postfix,80);
cout<<postfix<<endl;
Evaluate(ListA,postfix);

return 0;
}

what I'm doing wrong think my while loop is using all the lines ?
idont know
Looks ok to me .. what does the line
Expand|Select|Wrap|Line Numbers
  1. cout<<postfix<<endl;
  2.  
write to standard out?
Oct 29 '06 #90
saraSS
69
it just give me a blank line and yes I have the standar out
using namespace std;
Oct 29 '06 #91
saraSS
69
and when I do l=strlen(postfix); I got a zero
Oct 29 '06 #92
saraSS
69
should I read letter by letter maybe?
Oct 29 '06 #93
saraSS
69
got it thanks
Oct 29 '06 #94
arne
315 Expert 100+
got it thanks
What was the problem in the end?
Oct 29 '06 #95
saraSS
69
I replace this line
cin.getline(postfix,80,'\n');
for
cin>>postfix;
cout<<postfix<<endl;
actually easier but I dont know why I was getting confuse and trying to do something different but did not work so I stick with the easy way ;)
Oct 29 '06 #96
saraSS
69
how can I compare the two list ? if I'm only passing the pointers ?
Oct 29 '06 #97
arne
315 Expert 100+
how can I compare the two list ? if I'm only passing the pointers ?
Do you mean how to access the list elements?

Or do you mean how to compare two data sets (lists) in general?
Oct 29 '06 #98
saraSS
69
I mean in general because I'm passing the pointers of the two list and I want to compare and make a union but dont know how I have something like this

ListNodePtr list_union(ListNodePtr a,ListNodePtr b)
{
ListClass *c;
int k=0;
bool e;
int i,j;
while(a[i]!=0)
{
e=true;
while(b[j]!=0)
{
if(a[i]==b[j])
e=false;
}
if(e)
{
c->Info=a->Info;
}
}
for(i=0;i<a.counter;i++)
{
c.arr[k]=a.arr[i];
k++;
}
c->NumItems()=k;
return c;
}
Oct 29 '06 #99
arne
315 Expert 100+
I mean in general because I'm passing the pointers of the two list and I want to compare and make a union but dont know how I have something like this

ListNodePtr list_union(ListNodePtr a,ListNodePtr b)
{
ListClass *c;
int k=0;
bool e;
int i,j;
while(a[i]!=0)
{
e=true;
while(b[j]!=0)
{
if(a[i]==b[j])
e=false;
}
if(e)
{
c->Info=a->Info;
}
}
for(i=0;i<a.counter;i++)
{
c.arr[k]=a.arr[i];
k++;
}
c->NumItems()=k;
return c;
}
Hmm. It's not so easy to comment as I do not see the whole code, but I think your code will not work, since you don't allocate memory for your result list, you just define a pointer. And what is a[i]? 'a' is a pointer to a list node, but what does a[i] point to?

Generally, there are several ways to join two lists:
- copy one list, go through the other element by element and insert it into the copy if the element is not there (use that the lists are ordered!), or
- concatenate the two lists, sort the result (do you have a sort function for your list?), and remove double elements

And I am sure there are even more efficient ways, but you may start with the copy and insert approach. It's the most straightforward.

Once you have one of the list operations working, the others will be easy for you :)
Oct 30 '06 #100

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Booser | last post by:
// Merge sort using circular linked list // By Jason Hall <booser108@yahoo.com> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> //#define debug
7
by: barias | last post by:
Although circular dependencies are something developers should normally avoid, unfortunately they are very easy to create accidentally between classes in a VS project (i.e. circular compile-time...
3
by: donnyma | last post by:
I have a problem that looks like it has not been discussed before in these groups. I have a simple SQLAgent job that runs sp_who (could be anything, but let's just say sp_who for this example). ...
12
by: shivapadma | last post by:
please anyone tell me whether the following code works for checking the linked list is circular or not? address 0 address1 address2 | A|address1| |B|address2| |C|address0|...
3
by: Giampaolo Rodola' | last post by:
Hi there, I would like to know if such function would be correct for verifying if a link is broken and/or circular. def isvalidlink(path): assert os.path.islink(path) try: os.stat(path)...
2
by: morris11 | last post by:
I am trying to create a circular list that includes insert() , find() and remove() methodes. also a step() method that moves current along to the next link. I still need to display the list by...
5
by: =?Utf-8?B?Qm9i?= | last post by:
I have a table of dependencies and want to check to see if the dependencies cause a circular reference. Any sugesstions on how to do this using c#. Example, ID DependsOnID 1 2 1 ...
0
balabaster
by: balabaster | last post by:
Hi, I have a couple of tables: Units( Unit_PKey Int Identity(1,1) Primary Key, Unit_Name nvarchar(8), Unit_Description nvarchar(32) )
5
by: Muzammil | last post by:
i have problem with this operator "+" in doubly circular link list.(i think i have problem with return type). error is of instantiate error.(mean type dismatch) if any one can help me please...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.