VUDESK

¤Virtual University Of Pakistan Network¤



Welcome Visitors to VUDESK Family .Join VUDESK For Free to Get more Access to study material and lot of infotainment stuff. Stay Connected!!

VUDESk ALL Subject CODES
Find Your Subject Code , Join Group And You Will Get ALL related Data
ACC - Fundamentals of auditing and business
ACC311ACC501
ACF - (Accounting And Finance Related)
ACF619ACFI619
COM - (Commerce Related)
COM619COMI619
ECO - (Economics Related)
ECO401 ECO402 ECO403 ECO404
ENG - (English Related)
ENG001 ENG101 ENG201 ENG301 ENG401
ETH201 - Ethics (for Non-Muslims)
ETH201
ISL201 - Islamic Studies
ISL201
IT - (Info Tech Related
IT000IT0001IT430IT619ITI619
MIS - (Project And Internship Report)
MIS619 MISI619MIS620 MISI620
PAD - (Public Administration Related)
PAD619 PADI619
PAK301 - Pakistan Studies
PAK301PAK302
PHY - (Physics Related)
PHY101 PHY301
PSC201 - International Relations
PSC201PSC401
SOC - (Socialogy Related)
SOC101 SOC401
STA - (Statistics and Research)
STA301 STA630
URDU - (Urdu Related)
URD101

Assalam alaikum!Assignment of cs201 has uploaded.its due date is 26 june.

Tags: 4!, Need, assignment, for, idea, solution

Views: 197

Download Documents

Replies to This Discussion

Advertise Here

Please discuss here 

Assalam o alikum

Dear Friends

Check this 

Solution No 1

 

include <iostream.h>
using namespace std;

class location
{
int longitude;
int latitude;
public:
location();
location(int j,int i);
void display();
void* operator new (size_t size);
location operator ++();
location operator --();

};
location::location()
{
longitude=0;
latitude=0; 
}
location::location(int j,int i)
{
longitude=j;
latitude=i;
}

void location::display()
{
cout" Longitude : " endl;
cout" Latitude : " endl;
}

void* location::operator new(size_t size)
{
cout" Overloaded New operator Called" endl; 
void *pointer=malloc(size);
return pointer;
}

location location::operator ++()
{
longitude+=1;
latitude+=1;
}

location location::operator --()
{
--longitude;
--latitude;
}



main()
{
location *loc,l2;
loc=new location(10,20);
loc[0].display();
cout" After calling Overloaded ++ operator on location 1" endl;
++loc;
loc[0].display();
cout"Coordinate for location 2 :"endl;
l2=location(30,40);
l2.display();
--l2;
cout" After calling Overloaded -- operator" endl;
l2.display();
system ("pause");
delete loc,l2;
}

Assalam o alikum

Dear Friends

Check this

Solution nO 2 

#include <iostream.h>
using namespace std;

class location
{
int longitude;
int latitude;
public:
       location();
       location(int j,int i);
       void display();
       void* operator new (size_t size);
       location operator ++();
       location operator --();
      
};
location::location()
{
longitude=0;
latitude=0;         
}
location::location(int j,int i)
{
longitude=j;
latitude=i;
}

void location::display()
{
cout" Longitude : " endl;
cout" Latitude : " endl;
}

void* location::operator new(size_t size)
{
cout" Overloaded New operator Called" endl;     
void *pointer=malloc(size);
return pointer;
}

location location::operator ++()
{
longitude+=1;
latitude+=1;
}

location location::operator --()
{
--longitude;
--latitude;
}

 

main()
{
location *loc,l2;
loc=new location(10,20);
loc[0].display();
cout" After calling Overloaded ++ operator on location 1" endl;
++loc;
loc[0].display();
  cout"Coordinate for location 2 :"endl;
l2=location(30,40);
l2.display();
--l2;
cout" After calling Overloaded -- operator" endl;
l2.display();
system ("pause");
delete loc,l2;
}

Assalam o alikum

Dear Friends

Check this

Solution NO 3

#include <iostream>
#include <cstdlib>
using namespace std

;class location
{
int longitude;
int latitude;
public:
location();
location(int j,int i);
void display();
void* operator new (size_t size);
location operator ++();
location operator --();

};
location::location()
{
longitude=0;
latitude=0; 
}
location::location(int j,int i)
{
longitude=j;
latitude=i;
}

void location::display()
{
cout" Longitude : " endl;
cout" Latitude : " endl;
}

void* location::operator new(size_t size)
{
cout" Overloaded New operator Called"endl; 
void *pointer=malloc(size);
return pointer;
}

location location::operator ++()
{
longitude+=1;
latitude+=1;
}

location location::operator --()
{
--longitude;
--latitude;
}

main()
{
location *loc,l2;
loc=new location(10,20);
loc[0].display();
cout" After calling Overloaded ++ operator on location 1"endl;
++loc;
loc[0].display();
cout"Coordinate for location 2 :"endl;
l2=location(30,40);
l2.display();
--l2;
cout" After calling Overloaded -- operator"endl;
l2.display();
system ("pause");
delete loc,l2;
}



JazakAllah for giving solution!

Welcome and jazakAllah

yr ya to reeor dy rha hai>>>

plz proper solution send kiije

okay error nikalo na pher

ye thk nae hai prince bahi :(

Friends check it  

Download Documents

han g mujhe bhe pata hai main bhe error nikal raha hoon

RSS

*Member OF Week*

1. Duaa

punjab, Pakistan

=======================

Popular Social Events

=======================

+ Member of the Day

+ Member of the Week

+ Member of the Month

+ Member of the Year

+ Miss VU

+ Mr VU

+ Gold Members

+ Vote for Miss VU

+ Vote for Mr VU

+ Members Points Table

+ Profile Points Allocation

+ Competition Corner

+ Our Fans Club

+ Certificate Winners

---------------------------------------

௵ Scholars Of Desk

 Gold Members

 MR VU,S

௵ MISS VU,S

 Members Of Month

 Team Members

 Moderators 

  ADMINS

ʭAdministrationʭ

Senior Admin : Yasmeen

VUDESK Owner : Ismail Shah

DMCA.com

VUDESK GROUPS

© 2013   Created by ʭIsmail Shahʭ.

Badges  |  Report an Issue  |  Terms of Service

-->