Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does C/C++ contains every command that Qbasic has ? 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I would like to convert one of my Qbasic programs to C/C++, is it worth a try.
I want it to work under windows!
I did not use many compilcated commands:
stuff like print,line,inkey$ and so...
I also need mouse and SVGA, but i am sure there are libraries for it!
 
C++ is more than capable of doing everything that QBasic does. Learning new languages is always useful, but you can try one of the Windows versions of Basic. Rapid-Q is supposed to be good, I've not used it myself but have heard nice things about it. You can find it at Other versions of Basic can be found at Ron's Basic Programming pages at
There are also Basic to C translaters but I don't know how good they are. One is BCX at the Basic Guru site at another is BASCY from S. Narasimhan's site at
Most computer languages are able to accomplish the same objectives, it's just easier and quicker to do some things in one language than another.

Ray
 
Trying to translate from QuickBasic to C is pure hell. In fact, depending on how complex the application is, you may be better off just rewriting your program.

You will probably have better luck translating to VisualBasic. The PRINT command can be kind of tricky, but what I've allways done was make 25 label controlls and a few subroutines like, exPrint and exLocate, ect...

RapidQ is a very good programming language. I have tried it and its even more then it's cracked up to be. However, it should be noted that even though they claim to have a lot of compatibility, they dont. It should be considered as a BASIC, even as a close relitive of QB, but not a fully functional and compatible QB. You can make applications in RapidQ that do more then applications in QB, however the methouds of doing the same things are different.
 
QB has a lot of built in stuff that you have to call routines for in C/C++. Some of them are very OS dependent so you may have a problem if you are using these.

For instance, the timers are built into QB but in C/C++, you have to set up multi-threading and then set up a timer depending on what OS you are using.
 
Chathat, even apparently simple QB functions like [tt]PRINT[/tt], [tt]LINE[/tt] and [tt]INKEY$[/tt] are actually a lot trickier to implement than you would think. The people who worked on QuickBASIC spent an immense amount of time making these routines as functional as they are. Your best bet is to rewrite the program in C/C++, using modern paradigms. Note that Windows does have a mechanism whereby Windows programs can run inside of a DOS window, so if you wish to stay text-based, you can still do it :) Don't expect to get anything working without an immense amount of learning first, though -- C and C++ are very powerful, but that power comes from their complexity (complexity ironically made possible by how they are, at their core, very simple, compared to high-level languages).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top