Click here to Skip to main content
15,897,032 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dock an CControlBar into CChidFrame ? Pin
Richard MacCutchan11-Dec-11 22:10
mveRichard MacCutchan11-Dec-11 22:10 
GeneralRe: Dock an CControlBar into CChidFrame ? Pin
_Flaviu11-Dec-11 22:38
_Flaviu11-Dec-11 22:38 
GeneralRe: Dock an CControlBar into CChidFrame ? Pin
Richard MacCutchan12-Dec-11 0:35
mveRichard MacCutchan12-Dec-11 0:35 
GeneralRe: Dock an CControlBar into CChidFrame ? Pin
_Flaviu12-Dec-11 19:25
_Flaviu12-Dec-11 19:25 
Questionhow to parse an algebric equation in c++? Pin
rahulvishwakarma9-Dec-11 19:46
rahulvishwakarma9-Dec-11 19:46 
AnswerRe: how to parse an algebric equation in c++? Pin
Richard MacCutchan9-Dec-11 21:22
mveRichard MacCutchan9-Dec-11 21:22 
AnswerRe: how to parse an algebric equation in c++? Pin
Iain Clarke, Warrior Programmer9-Dec-11 23:08
Iain Clarke, Warrior Programmer9-Dec-11 23:08 
AnswerRe: how to parse an algebric equation in c++? Pin
Alan Balkany12-Dec-11 5:46
Alan Balkany12-Dec-11 5:46 
If you try to do everything at once, it's very hard. Breaking it into steps makes it simpler:

1. Turn the expression string into a list of tokens. A token can be a variable name, an operator, or a parenthesis.

2. Turn the token list into a tree of tokens, where each operator token has child tokens of its operands.

3. Integrate the lowest-level sub-expressions, than combine them according to the operators, e.g. the integral of A + B is the integral of A plus the integral of B.

====================================

For step 2, apply two rules to your token list until you have a single operator token left in the list, representing the whole expression. (If you end up with more than one token in the list, you probably started with an illegal expression):

1. If you have the pattern: "(", [token], ")", replace it with [token], i.e. delete parenthesis tokens around a single value.

2. In the most deeply-nested parentheses, replace [token] [operator] [token] in the list with [operator], and set [operator]'s left and right child-node pointers to the two token operands. Do this for the highest-precedence operators first.
AnswerRe: how to parse an algebric equation in c++? Pin
Bram van Kampen12-Dec-11 16:00
Bram van Kampen12-Dec-11 16:00 
QuestionHow do i get the screen coordinates of an IHTMLElement? Pin
kartikdasani8-Dec-11 22:25
kartikdasani8-Dec-11 22:25 
AnswerRe: How do i get the screen coordinates of an IHTMLElement? Pin
Code-o-mat9-Dec-11 3:02
Code-o-mat9-Dec-11 3:02 
AnswerRe: How do i get the screen coordinates of an IHTMLElement? Pin
Skynet_Code11-Dec-11 4:43
Skynet_Code11-Dec-11 4:43 
Questionprint n in even numbers only Pin
Yolande MR8-Dec-11 10:15
Yolande MR8-Dec-11 10:15 
AnswerRe: print n in even numbers only Pin
Albert Holguin8-Dec-11 10:26
professionalAlbert Holguin8-Dec-11 10:26 
QuestionRe: print n in even numbers only Pin
David Crow8-Dec-11 10:52
David Crow8-Dec-11 10:52 
AnswerRe: print n in even numbers only Pin
Yolande MR8-Dec-11 11:36
Yolande MR8-Dec-11 11:36 
SuggestionRe: print n in even numbers only Pin
David Crow8-Dec-11 12:20
David Crow8-Dec-11 12:20 
GeneralRe: print n in even numbers only Pin
Albert Holguin8-Dec-11 13:06
professionalAlbert Holguin8-Dec-11 13:06 
GeneralRe: print n in even numbers only Pin
David Crow9-Dec-11 17:55
David Crow9-Dec-11 17:55 
GeneralRe: print n in even numbers only Pin
Chris Losinger8-Dec-11 13:44
professionalChris Losinger8-Dec-11 13:44 
GeneralRe: print n in even numbers only Pin
Yolande MR8-Dec-11 13:57
Yolande MR8-Dec-11 13:57 
GeneralRe: print n in even numbers only Pin
Albert Holguin9-Dec-11 4:10
professionalAlbert Holguin9-Dec-11 4:10 
GeneralRe: print n in even numbers only Pin
Albert Holguin10-Dec-11 7:54
professionalAlbert Holguin10-Dec-11 7:54 
GeneralRe: print n in even numbers only Pin
Richard MacCutchan10-Dec-11 22:11
mveRichard MacCutchan10-Dec-11 22:11 
GeneralRe: print n in even numbers only Pin
Addy Tas11-Dec-11 8:47
Addy Tas11-Dec-11 8:47 

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.