dot-operator Questions
2
Solved
I agree this might be a very beginner's question, but I have no idea why I can't use '.' to access a member of a pointer to an object.
e.g.
JMP *sum_obj = new JMP("0");
JMP a;
sum_o...
Rehearing asked 25/4, 2023 at 9:56
2
Solved
I was doing a question on CodeWars and practicing some functional programming when I encountered a problem while trying to apply a function to a value.
So I made a pass() function that accepts a fu...
Jauregui asked 10/4, 2017 at 21:8
2
Solved
I want to write a function point-free in haskell, to keep things simple lets say I want to make this function:
maxmin :: Ord a => a -> a -> a -> a
maxmin a b c = max a (min b c)
I ca...
Hensel asked 20/11, 2012 at 14:11
5
Solved
When iterating over an vector (or other container) of pointers, is there any difference between and/or over advantage using:
for (it = v.begin(); it != v.end(); ++it) {
(*it)->method();
}
or...
Footboard asked 8/11, 2012 at 19:5
5
Solved
I'm trying to wrap my head around some of the differences in usage and syntax in C vs. Objective-C. In particular, I want to know how (and why) the usage differs for the dot operator and the arrow ...
Irresistible asked 31/1, 2012 at 0:12
4
The following scenario is given, to be interpreted as C++0x code:
struct B { };
struct A { B b; };
int main() {
B const& b = A().b;
/* is the object still alive here? */
}
Clang and GC...
Heres asked 16/4, 2011 at 20:37
1
© 2022 - 2024 — McMap. All rights reserved.