Employers: discover CodinGame for tech hiring
EVENTS
UPCOMING
PAST
SOLO
PUZZLES
CODE GOLF
OPTIMIZATION
MULTI
LEADERBOARDS
CLASH OF CODE
BOT PROGRAMMING
CODING ESCAPE
COMMUNITY
CONTRIBUTIONS
LEARN
DISCORD
FORUM
LIVE STREAMS
BLOG
Log In
Sign Up
Quiz 33
Anonymous
2,205 views
description:
Distinct pointer types can not be compared with equality operators
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
struct Foo
{
};
struct Bar
{
};
int main(int argc, char** argv)
{
Foo* f = new Foo;
Bar* b = new Bar;
if ( f == b )
std::cout << "EQUAL" << std::endl;
else
std::cout << "NOT EQUAL" << std::endl;
return 0;
}
Run
0
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
Suggested playgrounds
Quiz 66
By
Unnamed contributor
2,773
1
0
Quiz 76
By
Unnamed contributor
2,210
0
0
Learn Python with 'de Developer'
By
deDeveloper
3,805
36
0
Introduction à la programmation
By
M.ASTIER
2,211
13
0
ABOUT US
CAREERS
PRIVACY
FAQ
The #1 tech hiring platform
SCREENING
INTERVIEWING
ABOUT US
CAREERS
PRIVACY
FAQ
Facebook
YouTube
Twitter
LinkedIn
FR
EN