Running code off a SD Card

I'm creating a basic arduino Smart device (doesn't connect to internet YET), but I think the code will be so big I won't be able to fit it all on my Mega2560. Am I able to put the code on a SD Card and tell my board to run the code on the SD card, or is that not feasible?
I am planning on having quite a few "apps" running on it (one at a time of course), but each "app" might be HUGE.

No. You cannot put code on the SD card, load it and run it

Consider using a raspberry pi zero W?

@UKHeliBob
How do you suggest running absolutely massive code then?
I already have some example code that is 308% of Mega dynamic storage.

@PaulRB
Can I program raspberry pi with c++??
Can I connect a tft lcd to a raspberry pi zero W??
Can I use any arduino module or shield with raspberry pi??

You can code raspberry pi in many languages including C++.

You can attach TFT displays.

Some modules designed for Arduino can be attached to raspberry pi, but not all. Attaching a shield might be possible but does not sound sensible. What modules and shields do you plan to use? Please post links to the specs of those modules.

Optimise your code. As we can't see it, we can't advise.

If push comes to shove, get a more capable processor.

That does not say anything about the actual program.

You probably have stuff in RAM that can easily be moved to other locations. If you have e.g. bitmaps, those can be stored in either flash or on a SD card. Another one can be make (more) use of the F macro (although I don't think it will be enough on its own to get down to around 75% of dybnamic memory).

$106.00??????????????????????????
No way!!

What is $106? Post a link.

Everyone else is sold out!!

Can I not do this:

What about bitlash?

What costs that? And where do you live?
They are less than £10 here.

As said before it is not feasible for a C program.
However, there is a language called BitLash which can be read and run off an SD card.
BitLash
It is a text based interpreted language so it won't have the same speed as C code, which is compiled to machine code before running.

Hello Grumpy_Mike
Many many thanks for the link to BitLash.

Code should be uploaded to the Arduino. There is no way to put the code in SD card. If 512 KB is sufficient, switch to Arduino due. If that is not enough, consider switching to Raspberry Pi.

You can code the raspberry pi with C++ and Phyton. For C++, you can use the Arduino IDE

You can use the Pico W who is better at memory, it is 6€ and it can connect to the internet

It is 14€/12£

But not available! I checked a couple of the usual suppliers. Nothing except Pico.

Clearly the supplier found by @outbackhut knows they are one of very few with any stock and are profiteering.

Why not? Load it as a byte array and call the array pointer address. As long as it's self contained and ends in a return it SHOULD work. Or am I missing something?

Yes but the Pico W it's good, too. Plus it can connect to the internet and have more memory