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,
if of these lines doesn't have value
arrayname[2]throws exception.#define vkolhow value of
#definewhen not in positionarrayname[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
Post a Comment