-
struct Node
-
{
-
int value;
-
int phoneNo;
-
string name;
-
string surname;
-
string adress;
-
string Email;
-
-
Node* pLeft;
-
Node* pRight;
-
};
-
//Create a new node
-
Node* add(Node* tree, int value,int phone ,string nam,string sNam,string adr,string eM)
-
{
-
Node* tempPtr = new Node;
-
-
tempPtr->value = value;
-
tempPtr->phoneNo=phone;
-
tempPtr->name=nam;
-
tempPtr->surname=sNam;
-
tempPtr->adress=adr;
-
tempPtr->Email=eM;
-
-
tempPtr->pLeft = 0;
-
tempPtr->pRight = 0;
-
-
return addNode(tree, tempPtr);
-
}
-
-
//Writing in a tree
-
Node* addNode(Node* tree, Node* toAdd)
-
{
-
/**/if (toAdd->value == 0)
-
{
-
return tree;
-
}
-
else if (tree->value == 0)
-
{
-
return toAdd;
-
}
-
else
-
{
-
if(toAdd->value < tree->value)
-
{
-
tree->pLeft = addNode(tree->pLeft, toAdd);
-
return tree;
-
}
-
else
-
{
-
tree->pRight = addNode(tree->pRight, toAdd);
-
return tree;
-
}
-
-
}
-
}
-
void main()
-
{
-
int no=0,x;
-
int y;
-
Node* tree=new Node();
-
-
x=4;
-
y=432434435;
-
-
tree=add(tree,x,y,"alis","dan","tel aviv","asdas@adsd.daw");
-
}
-
2 2102
next time maybe ............... ............... ............... ........
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: bmassey |
last post by:
Hi,
Was wondering if anyone could help me with this odd error:
Am working in VS.Net Framework 1.1 C++.
I had a function defined as void colorizeImage(). I decided I didn't
need that function anymore and so renamed it to be void
filterTheImage(). The compiler comes back and gives me this message:
c:\...\klt.cpp(718): error C2365: 'filterTheImage' : redefinition;
previous definition was a 'formerly unknown identifier'.
If I name it...
|
by: KK |
last post by:
Dear All
I'm having an application developed in VC++6.0.Now i'm trying to complie the
same with Visual Studio.Net 2003,but getting some strange errors.Can
anybody help to get out of these errors?I didn't not modify any project
options for this project
Errors are listed below
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\atlalloc.h(336): error C3861: '_alloca': identifier
|
by: VicVic |
last post by:
Hello,
I have an old project, built with VC++. Now need to be compiled
in Visual Studio .Net 2003.
The project is going to build a DLL.
When i try to compile the project, i got the following errors:
c:\thepath\aaa.cpp(890): error C2065: 'm_nBackStyle' : undeclared identifier
c:\thepath\aaa.cpp(890): error C3861: 'm_nBackStyle': identifier not found,
even with argument-dependent lookup
|
by: GRoll35 |
last post by:
I have 3 files here - Header/Implementation/Driver
All it has to do is send the user's input (age)..to the class and the
class will figure out the price of the ticket. I'm suppose to create
the object and then have it display the cost of the ticket. I'm new to
using classes like this so I'm a little confused. Here is the errors I
get.
If anyone could point out where to start or something that I should
keep in mind that would be very...
|
by: Bobrick |
last post by:
Hi.
Thanks to everyone who replied to my last post, it turns out it wasn't
the line where I was trying to treat the variable in question as an
array which was the problem, but the line above.
char temp;
std::vector<unsigned charmmessage;
while (!done){
| |
by: i |
last post by:
#include<stdio.h>
#include<conio.h>
#include<process.h>
#include<string.h>
char ch;
int n,m;
void main();
char check(int,int,char);
void cash(int,int,char);
void debit_card(int,int,char);
|
by: Hooyoo |
last post by:
I have included windows.h, but it still says
'InitializeCriticalSectionAndSpinCount': identifier not found. Why?
any ideas?
Thanks.
|
by: jumpman17 |
last post by:
OK, I'm getting just this one error.
error C3861: 'upload_data': identifier not found
I have that function in the header file, why is it not seeing it? I can post code if needed.
|
by: zhang |
last post by:
error C3861: 'Navigate2': identifier not found
why???
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |