consolidate all repos to one for archive
This commit is contained in:
30
semester_2/programiranje_2/primeri/Example08/main.cpp
Normal file
30
semester_2/programiranje_2/primeri/Example08/main.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <iostream>
|
||||
#include "CPoint.h"
|
||||
|
||||
int main() {
|
||||
Point p1(3,4);
|
||||
CPoint c1;
|
||||
|
||||
//p1=c1; // OK
|
||||
//c1=p1; // ERROR
|
||||
p1.print();
|
||||
c1.print();
|
||||
|
||||
Point* p_p1 = &p1;
|
||||
Point* p_c1 = &c1;
|
||||
//p_p1->print();
|
||||
//p_c1->print();
|
||||
/*
|
||||
Point* arrPoints[2];
|
||||
arrPoints[0]=&p1;
|
||||
arrPoints[1]=&c1;
|
||||
std::cout << "---------------" << std::endl;
|
||||
for (int i=0; i < 2; i++) {
|
||||
arrPoints[i]->print();
|
||||
}
|
||||
*/
|
||||
delete p_p1;
|
||||
delete p_c1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user