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
Log In
Sign Up
Quiz 33
Anonymous
2,317 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 38
By
Unnamed contributor
2,354
0
0
Quiz 66
By
Unnamed contributor
3,053
1
0
Python from Zero to Hero
By
toEpam
7,094
81
0
Exercice Javascript
By
StevenHanse
23.3K
312
0
ABOUT US
CAREERS
PRIVACY
FAQ
BLOG
ABOUT US
CAREERS
PRIVACY
FAQ
BLOG
The #1 tech hiring platform
SCREENING
INTERVIEWING
Facebook
YouTube
Twitter
LinkedIn
FR
EN