Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

C in Visual Studio 2013

Posted on 2014-07-24
7
Medium Priority
?
888 Views
Last Modified: 2014-07-25
Is it possible to develop a C application using Visual Studio 2013?  If so;  what are the exact steps?

Thanks
0
Comment
Question by:Ray Turner
7 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 668 total points
ID: 40216979
Apparently you can.  Here is a link to Microsoft with a tutorial on how to do it.


Walkthrough: Compiling a C Program on the Command Line
http://msdn.microsoft.com/en-us/library/bb384838.aspx

mlmcc
0
 
LVL 31

Assisted Solution

by:Zoppo
Zoppo earned 668 total points
ID: 40217044
Hi kaufmed,

you can use the IDE too, just create an 'empty project' and add a '.c' file (via context-menu in Solution Explorer) which contains a main function.

ZOPPO
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 40217084
Argh!!! Sorry, mea culpa ...

(to be honest while I typed it a little part of my brain thought 'astounding that kaufmed doesn't know this' :o/ )
0
 
LVL 35

Assisted Solution

by:sarabande
sarabande earned 664 total points
ID: 40218804
to add to above comments :-)

if adding a source with .c (small letter c) extension to a visual c++ project, the compiler used defaults to the ansi c compiler. that wouldn't be the case if you renamed a .cpp file to .c later. if you don't want to rely on the defaults only you can right-click on the source file in the solution tree (project tree), choose 'Properties' and go to Configuration Properties -C++  Advanced page. here you can chose the compiler in 'Compile As' regardless of the file extension.

note, ansi c is very strict. for example you are not allowed to add new variables in the middle of a code block. as c is a subset of c++ you may find it convenient to use the c++ compiler for your c sources. that might require to using the extern "C"  clause to use for some declarations what could be a little bit tricky. but normally it worth the efforts.

Sara
0
 

Author Closing Comment

by:Ray Turner
ID: 40220882
Thanks!!!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question