Click here to Skip to main content
15,900,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: [Message Deleted] Pin
Hamid_RT27-Jun-08 7:43
Hamid_RT27-Jun-08 7:43 
QuestionHow do I get a menu bar by using a resource ID? Pin
KellyR24-Jun-08 9:12
KellyR24-Jun-08 9:12 
AnswerRe: How do I get a menu bar by using a resource ID? Pin
led mike24-Jun-08 9:41
led mike24-Jun-08 9:41 
GeneralRe: How do I get a menu bar by using a resource ID? Pin
KellyR24-Jun-08 9:44
KellyR24-Jun-08 9:44 
AnswerRe: How do I get a menu bar by using a resource ID? Pin
Hamid_RT27-Jun-08 7:49
Hamid_RT27-Jun-08 7:49 
Questionan easy one: importing from dll Pin
bulg24-Jun-08 8:27
bulg24-Jun-08 8:27 
AnswerRe: an easy one: importing from dll Pin
Cedric Moonen24-Jun-08 8:34
Cedric Moonen24-Jun-08 8:34 
QuestionEvaluating a user generated boolean query Pin
wolfsburged24-Jun-08 7:39
wolfsburged24-Jun-08 7:39 
As a test run for a much larger and more ambitious program, I have a small application where a user can generate a boolean algebra query from comboboxes of possible values and boolean operators.

Now lets assume that the user has created a syntactically correct expression (we've checked it with some other code), and that all the variables in the expression are valid and can be evaluated. Let's also assume for now that the output of the program window is now a CString which contains the expression with C++ valid boolean operators.

For example, lets say that we have CString expression which contains:
((X && Y) || Z)

Now I want to be able to process that expression and get a result. If I had a line such as:
bool result = ((X && Y) || Z);

I would have my result. Keep in mind that I need to keep this generic so that the user could input as simple or complex a query as needed.

My only thought is to do some awkward string processing to recursively move from any detected parenthesized section, and then have a switch statement or something to perform operations of AND, OR, NOT, etc on a pair of variables, and keep calling this for each found variable, moving outward from inner nested parentheses.

Is there a better way? Again, assuming that the input is "clean", if I somehow could just convert a CString into a code statement, it would process correctly...

Thanks,
Bill
QuestionRe: Evaluating a user generated boolean query Pin
David Crow24-Jun-08 7:49
David Crow24-Jun-08 7:49 
AnswerRe: Evaluating a user generated boolean query Pin
wolfsburged24-Jun-08 8:04
wolfsburged24-Jun-08 8:04 
AnswerRe: Evaluating a user generated boolean query Pin
Niklas L25-Jun-08 1:16
Niklas L25-Jun-08 1:16 
GeneralRe: Evaluating a user generated boolean query Pin
wolfsburged27-Jun-08 4:19
wolfsburged27-Jun-08 4:19 
QuestionUsing VC++ 2008 compiler with VC++ 2005, but keep compatibility with Win98 ? Pin
Defenestration24-Jun-08 5:54
Defenestration24-Jun-08 5:54 
AnswerRe: Using VC++ 2008 compiler with VC++ 2005, but keep compatibility with Win98 ? Pin
toxcct24-Jun-08 5:57
toxcct24-Jun-08 5:57 
GeneralRe: Using VC++ 2008 compiler with VC++ 2005, but keep compatibility with Win98 ? Pin
Defenestration24-Jun-08 6:06
Defenestration24-Jun-08 6:06 
GeneralRe: Using VC++ 2008 compiler with VC++ 2005, but keep compatibility with Win98 ? Pin
toxcct24-Jun-08 6:18
toxcct24-Jun-08 6:18 
GeneralRe: Using VC++ 2008 compiler with VC++ 2005, but keep compatibility with Win98 ? Pin
Defenestration24-Jun-08 10:55
Defenestration24-Jun-08 10:55 
AnswerRe: Using VC++ 2008 compiler with VC++ 2005, but keep compatibility with Win98 ? Pin
JudyL_MD24-Jun-08 10:39
JudyL_MD24-Jun-08 10:39 
GeneralRe: Using VC++ 2008 compiler with VC++ 2005, but keep compatibility with Win98 ? Pin
Defenestration24-Jun-08 10:56
Defenestration24-Jun-08 10:56 
GeneralRe: Using VC++ 2008 compiler with VC++ 2005, but keep compatibility with Win98 ? Pin
JudyL_MD25-Jun-08 2:03
JudyL_MD25-Jun-08 2:03 
AnswerRe: Using VC++ 2008 compiler with VC++ 2005, but keep compatibility with Win98 ? Pin
Joe Woodbury24-Jun-08 11:07
professionalJoe Woodbury24-Jun-08 11:07 
AnswerPossible solution to getting VC++ 2008 compiled apps to run on Win98... Pin
Defenestration24-Jun-08 12:24
Defenestration24-Jun-08 12:24 
Questionresource.h corruption Pin
Like2Byte24-Jun-08 4:01
Like2Byte24-Jun-08 4:01 
AnswerFound it on Code Project! Pin
Like2Byte24-Jun-08 4:50
Like2Byte24-Jun-08 4:50 
QuestionMDI child windows in the task bar Pin
Sylv3324-Jun-08 3:51
Sylv3324-Jun-08 3:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.