Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
34534
#include <iostream> #include <vector> struct alma { alma(int x) : x(x) {} bool operator==(const alma& rhs) const noexcept { return x == rhs.x; } int x; }; int main() { std::vector<alma> x(1, alma{0}); // the way you shoudl initilaize this std::vector<alma> y = std::vector<alma>{ alma{0} }; // the way you did std::cout << (x == y); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Find in vector vs unordered_map
ternary test
lref assignment
Range List for C++
Unpacking tuple
MY FIRST OBJECT ORIENTED PROGRAM
You can't erase a std::unordered_map::local_iterator
ECE2574_Function_Calling_Example
std::99 bottles of beer!
11/18
Please log in to post a comment.