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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Diff between QBasic and C++

Status
Not open for further replies.

801119

Programmer
Apr 10, 2000
311
SE
Greetings all...
I'm a beginner (not a newbee) at C++ and was wondering about the difference between the languages of QBasic and C++
Ok, I know there is a HUGE difference, but that is not what I'm looking for, more what can done more easy in either
I have touched QBasic before (doing a program that prints "hello world", was quite proud of my self then :) ), but that was over 10 years about when I was 10...

Thanks,
801119 My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
 
After reading your post about the nuances of C vs. QB, these things came to mind:

1) In C you have to explicitly declare variables and variable types BEFORE you can have access to them. Not so in QB, you can create variables in the middle of a line (or On-The-Fly).


2) Functions in C need to be preceeded with a Type or Void return. Not required in QB; however, Functions in QB return the answer as the called function-name.


3) Passed parameters to a QB subs call are done BYVAL(default) and therefore directly manipulated, whereas in C they are either BYREF or BYVAL


4) Libraries are not necessarily required (emphasis on 'necessarily') to perform standard functions such as PRINT, INPUT, OPENing a file, in C you must have the <IOSTD> module or whatever other modules accessable for compulation.

That's all that came to mind...anyone else have anything else to add to this list? &quot;The world shrinks more and more with every new user online.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top