|
-
Nov 20th, 2001, 02:05 PM
#1
Thread Starter
Frenzied Member
best C++ compiler
i am thinking about learning C++...what compiler do you think i should start with?
-
Nov 20th, 2001, 02:36 PM
#2
Monday Morning Lunatic
Borland's command line compiler 
It's a 32-bit windows compiler, so it should be fine for you - see the FAQ
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 20th, 2001, 04:17 PM
#3
PowerPoster
I like either the command line compiler, or VC++
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Nov 20th, 2001, 04:55 PM
#4
transcendental analytic
VC++ Sucks, it doesn't do partial template specifications
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 20th, 2001, 05:04 PM
#5
Monday Morning Lunatic
Originally posted by kedaman
VC++ Sucks, it doesn't do partial template specifications
But I think you're the only person in the world (other than Stroustrup) that would actually use them
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 20th, 2001, 05:13 PM
#6
transcendental analytic
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 20th, 2001, 09:16 PM
#7
PowerPoster
i don't even know what they are
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Nov 20th, 2001, 09:49 PM
#8
kedaman... does anything else? =).
Z.
-
Nov 21st, 2001, 01:24 AM
#9
Fanatic Member
good ol djgpp will get ya through it. =)
Haven't had any problems with it yet...but then again, i'm just starting out with C++.
-
Nov 21st, 2001, 09:14 AM
#10
djgpp is a dos compiler, so you'll get problems once you want to make real windows apps.
Keda: do you mean this thing:?
Code:
template <int S> class Y
{
enum {V = S}:
}
template <class T> class X
{
int i;
X() {i = T::V;};
}
??
Well, who uses those? It's against the idea of templates: they are meant to be used for ANY datatype! You can use macros instead, but they're not good as they are not typed:
this initializes any DirectX structure that needs a size:
Code:
#define DD_INIT(s) \
memset(&s, 0, sizeof(s)); s.dwSize = sizeof(s);
I admit I'd prefer:
Code:
template <class dd>
inline void DD_Init(dd s)
{
memset(&s, 0, sizeof(s));
s.dwSize = sizeof(s);
}
But such things are rather seldom...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 21st, 2001, 09:31 AM
#11
transcendental analytic
macros are bad, they pollute the scope of the names, and are just doing replacements in the code, templates instantiates functions and classes for specific purposes, something you can't achieve with macros. It's part of the generic programming paradigm which generilize and enhance both object oriented and functional programming into a more device independent form of programming.
And no I didn't mean those. I meant template specification, I posted a partial evaluation sample a while ago which evaluates the power of a value at compiletime, which wouldn't have been possible in MSVC since it needs all parameters to be specified for a specification to take place, not the hierarchic specification (yes Zaei there is a page out there if you search on Partial evaluation) which at least some other compilers support (If only the search engine would work i can find the post for you) anyways I found a workaround but that workaround is only practical for cheating MSVC to reset all parameters to do a specification. It's no solution for doing partial specification in general.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 21st, 2001, 09:52 AM
#12
aah, so you mean the thing with pow...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 21st, 2001, 09:54 AM
#13
transcendental analytic
Yep, Pow<3,4>() would evaluate to 81
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 21st, 2001, 10:41 AM
#14
well, I found this:
NOTE: Visual C++ 5.0 does not support template class partial specialization. The above sample causes compiler error C2989: template class has already been defined as a non-template class.
Seems you're using the wrong compiler for your fancy tricks.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 21st, 2001, 10:46 AM
#15
transcendental analytic
I am using Visual C++ 6.0 and I get the same error.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 21st, 2001, 10:52 AM
#16
-
Nov 21st, 2001, 10:54 AM
#17
transcendental analytic
.NET Beta 2 is out there, maybe they have corrected it?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 21st, 2001, 12:36 PM
#18
Monday Morning Lunatic
CB - Of course they're not ANSI compliant, very few compilers actually are.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 21st, 2001, 01:45 PM
#19
The only thing i dont like about DJGPP is that it automaticly puts the protected mode thing on it. Is there a way to have it make just a normal dos real mode app?
-
Nov 21st, 2001, 02:01 PM
#20
Thread Starter
Frenzied Member
-
Nov 21st, 2001, 02:24 PM
#21
PowerPoster
for all practical purposes, VC++.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Nov 21st, 2001, 03:17 PM
#22
Chimp: who WANTS to program real mode? Using segments and near and far pointers *shiver*
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 21st, 2001, 03:35 PM
#23
I would if it means the exe will be 3 kb instead of 150 kb.
-
Nov 21st, 2001, 05:15 PM
#24
Monday Morning Lunatic
It's inefficient to keep switching the processor from real to protected mode.
This is why writing 32-bit apps that don't need Windows or another host DPMI takes so much space - they need a server to run them properly so that they behave themselves.
I think under Unix you can get an asm program down to under 1K.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 21st, 2001, 07:31 PM
#25
Thread Starter
Frenzied Member
-
Nov 22nd, 2001, 12:01 AM
#26
PowerPoster
why is everyone so obsessed with loosing like 50k? i can see if the program is going on a floppy disk, but otherwise, it's just for show.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Nov 22nd, 2001, 12:19 AM
#27
You know, if people would actually worry about 50k, then computers in general would be so much better.
-
Nov 22nd, 2001, 12:23 AM
#28
Too true... save 50 kb on every file, and youd get a whole lot of memory savings. There is no reason for, to be specific, images should take up so much room. For most purposes, only the R, G and B colors are required for an application, so why not remove the extra byte? Parse the file manually at load, and get the correct color. It isnt hard.
Z.
-
Nov 22nd, 2001, 01:19 AM
#29
PowerPoster
i guess so. i just think a lot of times, it is a waste of time.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Nov 22nd, 2001, 08:00 AM
#30
Monday Morning Lunatic
Originally posted by ChimpFace9000
You know, if people would actually worry about 50k, then computers in general would be so much better.
Lets go and talk to Microsoft... 
Anyway, if you're writing a boot loader then you HAVE to worry about size (what is it, 2 sectors or something?)
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 22nd, 2001, 09:45 AM
#31
PowerPoster
I know, i was thinking of that too, that is why i didn't say "always".
let me rephrase....
When you are writing a HUGE app, 50k doesn't matter.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Nov 22nd, 2001, 12:35 PM
#32
Im gonna have to disagree with you again. When writing anything, 50k does matter. Im willing to let 5k go though.
-
Nov 22nd, 2001, 01:39 PM
#33
this is the reason why, when using windows, you should rather use console apps than real DOS apps...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 22nd, 2001, 01:45 PM
#34
Yeah... Saving space is a good thing. I have 7 DLLs and an EXE for my current project, and building them in debug form, I am taking up the same amount of space as Win 3.1. One of my log files is 8 megs or so, for ~30 seconds of game play(this is also a condensed format, the full HTML log was ~37 megs). So, I am guilty too, but it's OK, cuz its just debugging =).
Z.
-
Nov 22nd, 2001, 03:37 PM
#35
PowerPoster
Originally posted by CornedBee
this is the reason why, when using windows, you should rather use console apps than real DOS apps...
What do you mean? They are two different things...
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Nov 23rd, 2001, 03:48 PM
#36
I mean: for learning C++ and doing things like simple cout and such, you should rather use console apps than real DOS apps.
For GUIs, you should use real windows apps rather than graphic mode DOS apps. This is because they can then use a dll for the CRT and such. Also, you've got flat address space without the protected mode switch.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|