Question about Computers & Internet

1 Answer

C++ PROGRAMMING A PROGRAM THAT INSERTS A LIST OF WORKERS WITH THEIR,NAME, JOB,AGE AND SURNAMES USING C++ DATA STRUCTURES

Posted by on

Ad

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Hot-Shot:

    An expert who has answered 20 questions.

    Corporal:

    An expert that hasĀ over 10 points.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 21 Answers

Dear Mr. Thephu,
here is the solution:
first, declare a structure
struct workers
{
char name[20],job[10],surname[20];
int age;
workers *next; // this is the pointer to the next node of
//type worker.
};
in the main program, declare a pointer to first worker node called head as :
workers *head;
head = new workers;
or (head =( workers *) malloc (sizeof(workers));
Then in the main program, whenever the user wishes to create a worker and join it to the list, u can include the following code:
head ->next = new workers;
cin >> head -> name >>job>>surname >> age;
if the user finishes the input include,
head -> next = NULL.

Posted on Feb 05, 2008

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Hello i have a problem with my nokia 3110c whitch is : when i flash my phone with phoenix i got this result : Flashing started Creating product data items list Product data items list created Backup...


Now what is the condition of the phone ? If the phone has still problem, uninstall the previous file you have installed and re-install this one3110c file.Select the product code 0544311 or 0556977.This two files can use universal.Use fully charge battery or insert charger when message prompt.I hope there will be no error.Thanks good luck.

Aug 16, 2011 | Nokia N70 Cellular Phone

1 Answer

What do you mean recurrence relation in computer science? advantage and disadvantages in recurrence relation in computer science? what do you mean sequence? in computer science? what are the importance...


Recursion in computer science is a method where the solution to a problem depends on solutions to smaller instances of the same problem. The approach can be applied to many types of problems, and is one of the central ideas of computer science.Most computer programming languages support recursion by allowing a function to call itself within the program text. Some functional programming languages do not define any looping constructs but rely solely on recursion to repeatedly call code. Computability theory has proven that these recursive-only languages are mathematically equivalent to the imperative languages, meaning they can solve the same kinds of problems even without the typical control structures like "while" and "for".In computer science, a list or sequence is an abstract data structure that implements an ordered collection of values, where the same value may occur more than once. An instance of a list is a computer representation of the mathematical concept of a finite sequence, that is, a tuple. Each instance of a value in the list is usually called an item, entry, or element of the list; if the same value occurs multiple times, each occurrence is considered a distinct item.

Jun 30, 2011 | Computers & Internet

1 Answer

Err shows data execution prevention after restarting the machine


if it list a name of some program you did not ask it to run then your virus protection is working. usually you run your virus program that can be a long process. It will list virus found and quarantine. usually solves that problem. I also use a start up list of programs that start and let me kill ones I don't want running at start up. CCleaner has programs that cleans all the junk your computer load's up from being online adding and taking out program's or game's and it also has a list of what your computer does at start up and lets you edit the list. You can get that program at cnet.com

Apr 13, 2010 | Microsoft Windows XP Home Edition

2 Answers

Covert lotus notes address book "names.nsf" to an excel file


I just stumbled on this one. Actually it's EASY! Open up your contacts list in Notes, go to the File menu, choose export. You can pick either "Structured Text", "Tabular Text", or "Comma Separated Value". All of these import well into either of those programs.

Apr 18, 2009 | Computers & Internet

1 Answer

Hi! can anyone help me?


hot to access ipcamera for linux fedora 8 is it possible or not

Mar 21, 2009 | Computers & Internet

1 Answer

I want circularlinklist program in c++


This C++ program is to perform the following operations
on a circular linked list
1)insertion
2)forward traversal
3)reverse traversal
4)search
->node structure :
a node contains
1) integer data
2) pointer to next node
-> This program works in microsoft VC++ environment
in windows xp
-> This program uses the following header files
1)iostream.h
********************************************************/
#include<iostream.h>
class cll
{
private:
int data;
cll *next;
public:
cll* insert_one(int,cll*);
cll* delete_one(int,cll*);
void ftraverse(cll*);
void rtraverse(cll*);
void search(int,cll*);
void function();
};
cll*hd;
void cll::function()
{
cout<<”******************************************\n”;
cout<<”program to implement a circular linked list \n”;
cout<<”******************************************\n”;
cll * head;
head=NULL;
cout<<”\n\nMENU :\n”;
cout<<”1)insertion\n”
<<”2forward traversal\n”
<<”3)reverse traversal\n”
<<”4)search\n”
<<”5)exit\n\n”;
cout<<”Enter your option :”;
int opt;
cin>>opt;
int d;
while(opt!=5)
{
switch(opt)
{
case 1:
cout<<”Enter data to the node :”;
cin>>d;
head=insert_one(d,head);
cout<<”inserted\n”;
break;
case 2:
cout<<”The forward traversal is :\n”;
ftraverse(head);
break;
case 3:
cout<<”The reverse traversal is :\n”;
hd=head;
rtraverse(head);
cout<<”NULL\n”;
break;
case 4:
cout<<”Enter the element to be searched :”;
int d;
cin>>d;
search(d,head);
break;
case 5:
break;
default:
cout<<”invalid option”;
break;
}
cout<<”\n\nMENU :\n”;
cout<<”1)insertion\n”
<<”2)forward traversal\n”
<<”3)reverse traversal\n”
<<”4)search\n”
<<”5)exit\n\n”;
cout<<”Enter your option :”;
cin>>opt;
}
}
cll* cll::insert_one(int d,cll* c)
{
cll*NEW;
NEW=new cll;
NEW->data=d;
NEW->next=NULL;
if(c==NULL)
{
c=NEW;
c->next=c;
}
else
{
cll*c1=c;
while(c1->next!=c)
c1=c1->next;
c1->next=NEW;
NEW->next=c;
}
return c;
}
void cll::ftraverse(cll* c)
{
if(c==NULL)
{
cout<<”\nlist empty\n”;
return;
}
else
{
cll *c1=c;
cout<<c1->data<<”->”;
c1=c1->next;
while(c1!=c)
{
cout<<c1->data<<”->”;
c1=c1->next;
}
cout<<”NULL\n”;
}
}
void cll::rtraverse(cll* c)
{
if(c->next==hd)
{
cout<<c->data<<”->”;
return;
}
else
rtraverse(c->next);
cout<<c->data<<”->”;
}
void cll::search(int d,cll* c)
{
cll*c1=c;
if(c==NULL)
{
cout<<”\nlist empty\n”;
return;
}
else
{
if(c->data == d)
{
cout<<”found\n”;
return ;
}
while(c->next !=c1)
{
if(c->data==d)
{
cout<<”found\n”;
return ;
}
c=c->next;
}
if(c->data ==d)
{
cout<<”found\n”;
return ;
}
cout<<” search unsuccess ful \n”;
}
}
void main()
{
cll list;
list.function();
}

Mar 05, 2009 | Computers & Internet

1 Answer

Unable to Save - Internal Error


Use your burning software or similar ones like NTI CD/DVD maker, Nero or EZCD Creator and start new DVD DATA job. At the blank layout screen, drag your cd drive letter into the layout. The software should ask something like "do you wish to load the previous image from cd drive?" Click on yes and you should see the folders and files re-appear. Change the name of one of the folders or files and then re-burn. This should re-create the DVD data structure so you can access it properly.

Jun 27, 2008 | Autodesk AutoCAD 2004 for PC

1 Answer

Pyton Programming


could you give me more info plz

May 12, 2008 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

200 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18425 Answers

Alun Cox

Level 3 Expert

2678 Answers

David Payne
David Payne

Level 3 Expert

14162 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...