When programming C and C++ you often talk about functions and methods respectively as a way to compartmentalize the work that your program needs to do. Have you found yourself having these functions and methods well defined and similarly structured in terms of return types and argument types, yet doing different things, and you can define, in a switch statement, for instance, which one you’d want to do at any one particular part of your program execution. This is where Function Pointers, optionally arranged into arrays, can be a good thing to learn about, as we do in this primer tutorial written in XCode C and C++.
Background reading for tutorial:
Here is a tutorial that introduces you to some C and C++ programming code for Function Pointers in an array …
Let’s see some C and C++ via XCode for this …
Link to some downloadable C programming code … rename to main.cpp (or main.c … see how XCode can do C as well!) for use.
Link to some downloadable C++ programming code … rename to main.cpp.
If this was interesting you may be interested in this too.



Naming the things in a bathroom is a smarter vocabulary exercise than it first looks, because every learner already knows the room, so the words attach to objects they can see and touch instead of floating on a flashcard. Asking how many things can you name turns it into a game rather than a test, and the counting itself becomes the motivation: one more word than last time is a visible win. I like the way this kind of lesson uses a photograph as the prompt, since a picture gives every student the same starting point regardless of level, and the stronger students can move on to describing what each thing is for while beginners are still collecting nouns. The bathroom is a good choice of room too, because it is full of everyday words that textbooks often skip, the small objects people actually say out loud every morning. A daily habit of naming five new things around the house would build a working vocabulary faster than memorising lists, and this post is a good template for it.