c++ - evaluating a string in a condition -


how work string evaluate numbers coming condition?

string = "(t>=2 && t<5) || (t<1)";  int c = 0; for(int t = 0; t < 10; t++){     if(  {string} )         c++; } 

if it's qt write like

qscriptengine e; e.globalobject().setproperty("t", 123);  bool result = e.evaluate("(t>=2 && t<5) || (t<1)").tobool(); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -