Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ParseRow(char RowIn[]){
- int i = 0, k = 0;
- bool flag = false;
- char *pstr = RowIn;
- char c_ = ' ', num[512] = { 0 }, osn[512] = { 0 }, *pNum = num, *pOsn = osn;
- int nums = 0, base = 0;
- while (*pstr){
- c_ = *pstr;
- if (isalnum(c_) && (c_ != ' ') && !flag){
- *pNum++ = c_;
- }
- if (isalnum(c_) && (c_ != ' ') && flag){
- *pOsn++ = c_;
- }
- if (c_ == '('){
- strcpy(ColumnRow[k].Num, num);
- printf("%s", num);
- *pOsn = 0;
- pOsn = osn;
- flag = true;
- }
- if (c_ == ')'){
- printf("(%s) \n", osn);
- strcpy(ColumnRow[k].BaseString, osn);
- ColumnRow[k].Base = atoi(ColumnRow[k].BaseString);
- k++;
- *pNum = 0;
- pNum = num;
- flag = false;
- }
- *pstr++;
- }
- printf("\n\nWTF!");
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement