Software-help

Software-help

Share

13/04/2016

For help.
[email protected]

13/04/2016

using namespace std;
class Distance
{
private:
int feet;
float inches;
public:
// Constructor with declaration & definition
Distance()
{
feet = 0;
inches= 0;
}

void set_All(int , float); // 1 Setter with declaration only. Definition is seperate

int get_feet(); // 2 Getters with declaration only. Definition is seperate
float get_inches();

Distance operator + (Distance); // Operator Overloading
void operator += (Distance); // Operator Overloading

}; // End of class

/* Seperate definitions of each member function. Rule is

function_return_type Class_name :: function_name( arguments )
{
function definition
}
*/
Distance Distance::operator + (Distance t_d2)
{
Distance tmp;
tmp.feet = feet + t_d2.feet;
tmp.inches = inches + t_d2.inches;

return tmp;
}

void Distance::operator += (Distance t_d2)
{
feet = feet + t_d2.feet;
inches = inches + t_d2.inches;
}

void Distance::set_All(int t_feet, float t_inches)
{
feet = t_feet;
inches = t_inches;
}
int Distance::get_feet()
{
return feet;
}
float Distance::get_inches(){
return inches;
}

int main()
{
Distance d1;
d1.set_All(10,2.8);

Distance d2;
d2.set_All(4, 5.6);

cout

07/01/2016

/*
Copyright:
**********
This program code can be used, alter, distributed in any positive way
Author:
*******
Qaisar Abbas
*/
//First Creat txt file with name "data.txt"
/*****************************************************
# Authors Qaisar Abbas
*******************************************************/




using namespace std;
struct node
{
string name;
string number;
node*next;
};
//Declear Global Variable
node *head=NULL;
int count=0;
//Start of Function Declaration
void getDataFromFile();
void addNumber(string, string);
void searchNumber();
void saveDataInFile();
int runagain();
//Start of Main Function
int main()
{
//Start of Local Declaration
string fname;
string no;
int run;
int optn;
//End Of Local Declaration

//Function Call To Get data from file
getDataFromFile();

//Start do while loop to Run Program again
do{
//Start of User Menu
coutnext=NULL;
}
else
{
node *temp;
temp=new node();
temp->name=fname;
temp->number=no;
node *crnt=head;
while(crnt->next!=NULL)
{
crnt=crnt->next;
}
crnt->next=temp;
temp->next=NULL;
}
}//End Of function Defination

//Start of Function Search Number Defination
void searchNumber()
{
string key;

coutkey;
node *crnt=head;
while(crnt!=NULL)
{
if(crnt->name==key)
{
cout

22/11/2015

Class work.
**************************************************
//Author :Qaisar Abbas Khokhar Bharmi


using namespace std;

struct node
{
int data;
node *next;
};
node*head=NULL;
void dell();
void addNode(int);
void print();
int main()
{
for(int i=1;idata=x;
head->next=NULL;
}

else
{

node *temp;

temp= new node();

temp->data=x;

node *cur=head;

while(cur->next!=NULL)
{
cur=cur->next;

}

cur->next=temp;

temp->next=NULL;

}
}
void dell()
{
cout

Want your business to be the top-listed Computer & Electronics Service in Lahore?
Click here to claim your Sponsored Listing.

Website

Address


Lahore