Compile .c file as C++ in MS Studio

A

AR John

Hello everyone,

Can anybody help me how can I compile of my *.c files as c++? I see
that by default MS Visual Studio compiles the *.c files assuming C
source. How can I instruct the compiler to compile it as C++ source?

Thanks in advance
AR
 
P

Peter Koch Larsen

AR John said:
Hello everyone,

Can anybody help me how can I compile of my *.c files as c++? I see
that by default MS Visual Studio compiles the *.c files assuming C
source. How can I instruct the compiler to compile it as C++ source?

Thanks in advance
AR
You should ask this question in a newsgroup dedicated to your compiler -
here it is off-topic. Try microsoft.public.vc.language.

/Peter
 
D

David T. Croft, Ph.D.

The following CL command line specifies that TEST1.c, TEST2.cxx, TEST3.huh,
and TEST4.o are compiled as C++ files, and TEST5.z is compiled as a C file.

CL TEST1.C TEST2.CXX TEST3.HUH TEST4.O /Tc TEST5.Z /TPJust how to do this in
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,181
Messages
2,570,970
Members
47,536
Latest member
VeldaYoung

Latest Threads

Top