COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
main2_4.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include "
bounding.h
"
3
using namespace
std;
4
5
int
main
() {
6
7
int
x1 = 10;
8
int
y1 = -10;
9
int
w1 = 10;
10
int
h1 = 20;
11
12
int
x2 = -10;
13
int
y2 = 10;
14
int
w2 = 50;
15
int
h2 = 10;
16
17
bool
result =
mergeBoundingBoxes
(x1, y1, w1, h1, x2, y2, w2, h2);
18
19
if
(result) {
20
cout <<
"Overlaps"
<< endl;
21
}
else
{
22
cout <<
"Does not overlap"
<< endl;
23
}
24
25
}
mergeBoundingBoxes
bool mergeBoundingBoxes(int &x1, int &y1, int &w1, int &h1, int x2, int y2, int w2, int h2)
Definition
2.cpp:9
bounding.h
main
int main()
Definition
main2_4.cpp:5
Assignment2
P2
main2_4.cpp
Generated on Sun Sep 29 2024 16:39:53 for COMP2113 by
1.12.0