Answer the question
In order to leave comments, you need to log in
Why doesn't this link code work?
Good evening
#include <iostream>
#include <string>
#include "kwat.h"
using namespace std;
KWat& swap(KWat&, const KWat&);
void display(KWat&);
int main(){
KWat box1(200,4.3,18);
KWat box2(500,5.0,20);
display(swap(box1,box2));
}
KWat& swap(KWat& ob, const KWat& cob){
ob.price = cob.price;
return ob;
}
void display(KWat& ob){
cout<<"Price of box1: "<<ob.price;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question