Advertisement

Template Fun

Started by May 30, 2000 06:40 PM
14 comments, last by Josh Neta 24 years, 6 months ago
I had the same piece of fun with inline function definitions. Something along these lines:
The ANSI C++ standard says that by default an inline function has file scope. To give it larger scope you have to declare it extern. However, if you do that in Visual C++, it just ignores the inline once again...
So you''re stuck with writing the whole inline function in a header file.
No great loss, since I moved away from inline C functions and back to C++ classes today ;-).


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
Erik Post: How hard do you think it would be to write a simple Windows IDE for the command line compiler? You know, just something to manage project files, format the text, and man the command line switches. It would be nice to have a free IDE for it...so you can use that instead of VC if you need better standard support.


- null_pointer
Sabre Multimedia
Advertisement
Could you not specify which compiler to use in the DevStudio settings somewhere? You can certainly choose custom build steps on a per-file basis, so I am assuming you could choose an alternative compiler easily enough. After all, I think this is how the Intel compiler works.
Kylotan: hmm...I''ll have to try that sometime. It would be neat to create your own IDE though. I have an idea for an IDE that would really revolutionize source code (hint: newbie comment). VC''s IDE has a lot of bugs (not serious ones, but irritating).


- null_pointer
Sabre Multimedia
quote: Original post by null_pointer

I revise my old opinion -- VC has lousy ANSI C++ support. BTW, do you know of a Windows compiler/IDE that works better with ANSI C++?


As far as I can tell, Metrowerks CodeWarrior has 100% ANSI compliance (that is the right word, right?). I have yet to find a problem with the ANSI libraries/implementations/etc, but when it comes to 3rd party stuff, like DirectX, look somewhere else (although I do have an older version...)



--------------------


You are not a real programmer until you end all your sentences with semicolons;

Yanroy@usa.com

Visit the ROAD Programming Website for more programming help.

--------------------

You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming
You are unique. Just like everybody else.
"Mechanical engineers design weapons; civil engineers design targets."
"Sensitivity is adjustable, so you can set it to detect elephants and other small creatures." -- Product Description for a vibration sensor

Yanroy@usa.com

Well, given that DevStudio is little more than a glorified text editor with a few database facilities, I am sure a decent alternative could be made pretty easily You could knock something together in Borland C++ Builder in a couple of days, and have it call the Microsoft compiler behind the scenes. Wouldn''t that annoy them

This topic is closed to new replies.

Advertisement