c++ - How can I check a log for a string or a digit? -



c++ - How can I check a log for a string or a digit? -

i'm doing basic coding in visual studio.

i attempting check output of command grouping of period separated digits or string. works fine when checking string doesn't seem work if inquire grouping of period separated digits such 4.2.3

the code using follows

bool checklogforstring(char* str) { file* f = fopen (logname, "r"); if (null == f){ messagebox(0, "can't find log!","error",mb_applmodal|mb_ok|mb_iconstop);return false;} bool found = false; while (!feof(f)) { char buf[1000]=""; if (fgets(buf,1000,f)==null) break; strupr(buf); if (0 != strstr (buf, str))found = true; } fclose (f); homecoming found; }

i phone call follows

if (checklogforstring("words")) { }

that works fine when try

if (checklogforstring("4.2.3")) { }

it doesn't work. can create work please?

c++ visual-studio-2008

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -