[Solved] how to fix error: “the prelaunchtask ‘c/c++: gcc build active file’ terminated with exit code -1” [closed]

Introduction

Solution


Don’t use special shell characters in your file names. & is special, so C&Cpp will bite you, again and again and again and again AND AGAIN AND AGAIN.

Special shell characters in filenames are not illegal, and you can use them if you really want to, but…

The alternative is to fix all of your shell scripts and config files and whatnot such that all user-provided strings such as file names and parameters and everything else are properly escaped. This is hard. Not using & is easy. Your choice.