void Tree::createTree(){
Node *traverse;
root=NULL;
nodeCount=0;
srand(time(NULL));
for(int i=0; i<N; i++)
{
traverse=root;
Node *newnode = new Node;
...
Type: Posts; User: blackolick_
void Tree::createTree(){
Node *traverse;
root=NULL;
nodeCount=0;
srand(time(NULL));
for(int i=0; i<N; i++)
{
traverse=root;
Node *newnode = new Node;
...
I know that much but thanx :) The problem is about realization of this algorithm. I am stuck after first 3 nodes :confused: And N may not be 1, 3, 7, 15 etc.
Hello everyone!
First of all, let me share the problem:
First, you should create your binary tree with N nodes. Each node in the tree will store an integer value (You may randomly generate...
You are the man :) Thanks a lot.
First of all thanks for your reply, but that was my midterm question. Structures and main was given, and I was asked to write add and empty methods... :confused:
Here is create:
void CircularDoublyLinkedList::create(){
final=NULL;
}
And I meant CircularDoublyLinkedList::add method.
Hi all, I am still having troubles with distinguishing call by reference and call by value. Let me ask my question on an example.
struct Node{
int data;
Node *next;
Node *previous;
};...
First of all thanks for help. And I just wanted to create a quick draft before I move on. That's why I didn't specify what my 'struct node' contains. As you said, I guessed it would work without...
Hello everyone,
I am trying to exercise on structures, linked lists. But in the switch case part, I cannot use my structure as function argument. And, I have no clue about what the problem is. :)...
Okay I am completely lost now :) I read the whole page that you sent. Thanks for that. I realized most of the things I knew is wrong. But, I have to learn the right ones now :) If my code was like...
You are totally right, Jim. However, the thing in my mind was to make it available for general use. I got what you meant. I just forgot to change int_part to long as it should be. Gratitudes for...
OMG ! :D Thank you :) Luckily, I haven't sent the code to the instructor to check :)
When I try to execute it, compiler yields an error whic is "syntax error: type". And here my code is :
#include <stdio.h>
void decompose(double x, int *int_part, float *float_part)
{
...
Yes Grumpy, maybe it is as you said sir. But consider that i am a beginner in c programming approach as you can understand from my coding. :) And i've learned until loops, that's why I insist on...
Yes Salem. My first loop (while) for the sum of (1/denom)s, and the second one (for) for factorials.. And thanx for your reply.
OMG ! I spent my 2 days just for this :) I'm so grateful sir. Thank you very much "qny" !
As I'm informed about the rules, I won't ask you to write all of the code.. The problem i am trying to overcome is that:
Write a program that approximates e by computing the value of :...