C++/My new programming language
Expert: vijayan - 2/28/2009
QuestionSir,
I'm creating a new programming language using C++. The idea is to write a C++ program that can understand your program written in the way I've developed(very easy codings only). I'm now facing a problem with it. The problem is: When the program is executed for the first time it shows errors for the correct program & it shows the correct output during it's second time execution(I've used a loop in the program that asks u 'Do u want to execute another program or not'). Can u clarify my doubt please?
Answer> When the program is executed for the first time it shows errors for
> the correct program & it shows the correct output during it's second
> time execution(I've used a loop in the program that asks u 'Do u want
> to execute another program or not')
without having a look at the code, i cannot diagnose the problem with any certainty.
but the symptoms suggest that the following is a strong possibility:
a. some variables are either left uninitialized (or initialized incorrectly) at start up.
b. these are then assigned to during the first run, leaving them in a valid state.
c. in the second run, the program uses these values and runs correctly.