Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Urgent need help: a translator for pascal source program

Posted on 1997-04-05
7
Medium Priority
?
251 Views
Last Modified: 2010-04-10
null
0
Comment
Question by:lugangxu
  • 5
7 Comments
 

Author Comment

by:lugangxu
ID: 1162579
Adjusted points to 215
0
 

Author Comment

by:lugangxu
ID: 1162580
Edited text of question
0
 

Author Comment

by:lugangxu
ID: 1162581
Adjusted points to 220
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:lugangxu
ID: 1162583
Edited text of question
0
 

Author Comment

by:lugangxu
ID: 1162584
I've successfully made the  program myself!
0
 

Accepted Solution

by:
akapur earned 660 total points
ID: 1162585
Pascal is a procedural language.  So a translator will never be able to produce object oriented C++ code if that is what you want.  The best you can hope for is procedural code which is essentially C.  If you compile the C generated by p2c or ptoc with a C++ compiler you will get all the benefits of type checking that you would with C++ procedural code.  The only difference between procedural C code and procedural C++ code would be the use of streams instead of C I/O statements anyway. I suggest you use p2c of ptoc and if you must change the I/O statements to use streams instead.  Note that by doing this you will be slowing down your prog.  If you want an object oriented implementation of your program you will have to redesign your program.  No current program can convert a procedural design into object oriented design.  
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question