[OT] Visual C++ question

Jerry Feldman gaf at blu.org
Fri Feb 14 15:02:51 EST 2003


I think this is the answer. 
Specifically, the problem is that some of my example programs (fully
ANSI compliant C) do not compile with Visual C++ (at least with the
student I had at the time). I used VC++ several years ago at Digital
when I (and 2 others) wrote the assembler for Windows NT (Alpha). 
On Fri, 14 Feb 2003 14:20:46 -0500
"Wizard" <wizard at neonedge.com> wrote:

> > I teach C programming at Northeastern, and most of my students this
> > quarter are using GCC, but WRT: Visual C++.
> > How does one tell Visual C++ that it should be compiling a straight
> > C program, not C++.
> >
> > Also, the same might go for Borland also.
> 
> I'm not sure which you mean, but in Visual C++ you can do two things:
> 
> 1.> use the '/Tc' option to specify C source file, regardless of
> extension. 2.> use the '/Za' option to specify ANSI C - sort of -
> there is no guarantee of ANSI C compatibility, it just claims that
> non-ANSI constructs are flagged as errors. I suspect it should work
> most of the time, though.
> 
> It seems to me there was an 'ANSI_C' or 'STANDARD_C' compiler
> directive at one point, but I'm not positive of that. That may have
> been C++Builder, however.
> 
> Grant M.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.blu.org/pipermail/discuss/attachments/20030214/30847cbe/attachment.sig>


More information about the Discuss mailing list