Home > Back-end >  2. The problem of recursive replacement
2. The problem of recursive replacement

Time:10-06

C/C + + programming, extending in the source file # include directive () in the form of recursive, replace with the contents of the file name form is shown in the following code lines,
# include "filename"

CodePudding user response:

Understand what meaning,

CodePudding user response:

This is the simulation of C/C + + preprocessor functionality, open source file, each line to check if the first character is "#", if not, the same output this line; If it is to deal with pretreatment of instructions, the "#" after the first followed by the pretreatment of the command parsing out, if it is include, extract the back of the file name, open the file, and then the recursive call the preprocessing function

CodePudding user response:

To write a program
  • Related