Home > Back-end >  Recursive replacement problems
Recursive replacement problems

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, the embedded in the file

CodePudding user response:

Embedded file, need with the method of recursive calls pretreatment function, in order to deal with in the embedded file # include directive
  • Related