No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
Hello, I have a problem with my desktop computer's internet connection. I am running both my desktop and laptop through my router to connect to the internet. My laptop has no problems at all but my desktop internet browser's won't work. I can access the internet on other ports such … | |
code file is attached .... [CODE][#include<iostream> using namespace std; class citizen{ char* name; char* nationality; public: citizen(){ //default constructor name = "Usman"; nationality = "pakistani"; } citizen(char *aName, char *aNationality) //parameterized constructur { name = new char[strlen(aName, aNationality)+1]; strcpy(name, aName); strcpy(nationality, aNationality); } citizen(const citizen &obj){ //copy constructor name = … | |
#include<iostream> using namespace std; class citizen{ char* name; char* nationality; public: citizen(){ name="Usman"; nationality="pakistani"; } citizen(char * aName, char * aNationality) { name = new char[strlen(aName, aNationality)+1]; strcpy(name,aName); strcpy(nationality,aNationality); } citizen(const citizen &obj){ name = obj.name; nationality =obj.nationality; } void showName(){ cout<<name<<endl; } ~citizen() { delete[]name; } }; int main() … |