You are here:

C++/My new programming language

Advertisement


Question
Sir,
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.  

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


vijayan

Expertise

my primary areas of interest are generic and template metaprogramming, STL, algorithms, design patterns and c++11. i would not answer questions about gui and web programming.

Experience

about 15 years or so

Education/Credentials
post graduate engineer

©2016 About.com. All rights reserved.