With so many recipes calling for cornstarch, realizing you've run out can be alarming. Luckily, you can use all-purpose flour as a replacement.
If you're using flour as a thickening agent over cornstarch, you'll have to roast it with some butter to create a roux to eliminate its raw, unprocessed flavor.
In frying, cornstarch creates a crunchy exterior. Flour will create a thicker, fluffier coating with more bite to it.
When baking, you're better off not replacing cornstarch with all-purpose flour. The former works as a tenderizer, and flour will only mess with the texture.