c# - How to store values from .h files? -


i need read .h file , store values. example, .h files contain lines so:

#define mbbh  5  #define gbnn             90  #define mkoll  

i wrote code read .h file (where use string array, search #define , value of name i.e., ( mbbh, gbnn)- arrayname [1]).

the problem have is,

  1. if of these lines doesn't have value arrayname[2] throws exception.

    #define vkol

  2. how value of #define when not in position arrayname[2]?

    #define gbbn 90

this define statement has value, how can it?

change

string[] lineparts = string.split(line, ' '); 

to

string[] lineparts = string.split(line, ' ', stringsplitoptions.removeemptyentries);  

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -