Qbasicnews.com
January 26, 2020, 02:21:11 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 [2] 3
  Print  
Author Topic: C++/QBasic  (Read 7792 times)
TheBigBasicQ
*/-\*
*****
Posts: 4550



WWW
« Reply #15 on: February 19, 2004, 06:10:20 AM »

and DJGPP and TC are two of them =)
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #16 on: February 19, 2004, 10:38:22 AM »

Quote from: "PlayGGY"
But why would that make any 16 bit C/C++/assembly DLLs not work?  Maybe because QB doesn't have the equivilant of "__stdcall" in C++ (reversing the parameters' order on the stack, and requires the caller of the function to manually push and pop them).


Because here is not such a thing like a MSDOS DLL. Dynamic Link Libraries are windows stuff.

C stuff work in QB if you reverse the parameters in the stack in the C function (using pascal in your C program) or you read them in the reversed order (using CDECL in your BASIC program). Anyhow, I don't understand your question very well.

Toonski: I am using QC 'cause I've read that it's the best suited to work with QB. Before I mess with Borland C I am using the easy approach.

TBBQ: DJGPP is not a 16 bits compiler.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #17 on: February 20, 2004, 02:56:27 AM »

Is Quick C a good learning tool for C?
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
toonski84
__/--\__
*****
Posts: 2567



« Reply #18 on: February 20, 2004, 03:17:00 AM »

NO.  AVOID IT LIKE THE PLAGUE.

I use Dev-C++, which uses GCC.  Not the fastest or greatest of compilers, but it's free, and pretty decent in it's own right.  Learn C syntax and stuff through console programming, then move your way up to using a graphics library like allegro that let's you do cool stuff without interfacing with that god-awful windows.

So, from here:
1) Get Dev-C++ or whatever compiler suits you.
2) Make some spiffy console programs until you're cool with the syntax
3) Find a good game library, such as allegro, so you have a means of playing around.
4) Try and move you're way up to using the WinAPI, GDI and DirectX/OpenGL.

Anyway, that's the way I've been going about things.  Anybody else have their suggestions on where to start?
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #19 on: February 20, 2004, 03:29:54 AM »

I mean a learning tool. Just the syntax and get myself a better compiler when I get cooler. :*)

I only have QuickC at home. :*(
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
toonski84
__/--\__
*****
Posts: 2567



« Reply #20 on: February 20, 2004, 03:40:57 AM »

Well, console stuff is a good place to start out because you can give output easily with printf and play around.

C syntax is pretty standard across all C compilers.  Unlike Basics, no one feels the need to redefine language when they make a compiler, or when they do, they call it silly things like "d" or "c#".
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #21 on: February 20, 2004, 03:46:10 AM »

Cool!!! This is great. C as I see it implemented in QC is not that bad. I just really hate those {}. :*)

But yeah, I think I can make a lil C proggie now.
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
toonski84
__/--\__
*****
Posts: 2567



« Reply #22 on: February 20, 2004, 05:00:40 AM »

I'd get used to the "{}" bit.  There are so many "C" offshoots that are in love with it (Java, Perl, PHP).
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
PlayGGY
Forum Regular
**
Posts: 144



« Reply #23 on: February 20, 2004, 08:32:12 PM »

Quote from: "toonski84"
I'd get used to the "{}" bit.  There are so many "C" offshoots that are in love with it (Java, Perl, PHP).


You left out th best 2: C++ and C#.

I don't see why you would want to learn C over C++... unless you really hate type safety and OOP.
Logged
RST
Wandering Guru
***
Posts: 326



« Reply #24 on: February 20, 2004, 10:25:07 PM »

Quote from: "PlayGGY"

I don't see why you would want to learn C over C++... unless you really hate type safety and OOP.


Quote from: "Na_th_an"

Not in C++, but in C. C++ need too much libraries and runtimes which are not compatible with QB.
Logged
PlayGGY
Forum Regular
**
Posts: 144



« Reply #25 on: February 20, 2004, 10:50:44 PM »

Quote from: "RST"
Quote from: "PlayGGY"

I don't see why you would want to learn C over C++... unless you really hate type safety and OOP.


Quote from: "Na_th_an"

Not in C++, but in C. C++ need too much libraries and runtimes which are not compatible with QB.


Woops... Tongue

As for the libraries:  C++ can use the C ones just fine, and I don't know what runtimes he is talking about.
Logged
TheBigBasicQ
*/-\*
*****
Posts: 4550



WWW
« Reply #26 on: February 22, 2004, 05:18:11 AM »

Quote from: "na_th_an"
TBBQ: DJGPP is not a 16 bits compiler.


I meant to say that its a compiler which is primarily used to compile DOS programs.
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #27 on: February 22, 2004, 10:34:04 AM »

Quote from: "PlayGGY"
As for the libraries:  C++ can use the C ones just fine, and I don't know what runtimes he is talking about.


The iostream library, for example. Try to link a C++ program which uses the iostream to a QB .OBJ.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
adosorken
*/-\*
*****
Posts: 3655



WWW
« Reply #28 on: February 22, 2004, 01:21:07 PM »

I think I'll stick with HuC and let you x86 C/C++/C#/D/whatever coders fight it out on your own. Cheesy Cheesy Cheesy
Logged

I'd knock on wood, but my desk is particle board.
TheBigBasicQ
*/-\*
*****
Posts: 4550



WWW
« Reply #29 on: February 22, 2004, 04:50:38 PM »

HuC? havent heard about it much =P.
Logged
Pages: 1 [2] 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!