473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to RUN C by Microsoft Visual Studio

Hi

I would like to use microsoft visual studio to compile a C program.
Does somebody know how to compile, link and run it?
I create a project and add a program to it.
I press F5 to start debug (because I cannot find any command to run,
why?).
A console window just appears and close very quickly.
How can I pause the console window?

Mike
Feb 27 '08 #1
6 3788
Mike wrote:
Hi

I would like to use microsoft visual studio to compile a C program.
Does somebody know how to compile, link and run it?
That somebody will be reading one of the visual studio groups!

--
Ian Collins.
Feb 27 '08 #2
On 2$B7n(B27$BF|(B, $B2<8a(B2$B;~(B32$BJ,(B, Ian Collins <ian-n...@hotmail.comwrote:
Mike wrote:
Hi
I would like to use microsoft visual studio to compile a C program.
Does somebody know how to compile, link and run it?

That somebody will be reading one of the visual studio groups!

--
Ian Collins.
thank you for your reply.

Mike
Feb 27 '08 #3
Mike wrote:
>
Hi

I would like to use microsoft visual studio to compile a C program.
Does somebody know how to compile, link and run it?
I create a project and add a program to it.
I press F5 to start debug (because I cannot find any command to run,
why?).
<OT>
Ctrl-F5. It's right there in the "build" menu. I can't answer "why"
you cannot find it.
</OT>
A console window just appears and close very quickly.
How can I pause the console window?
Dunno. My programs always pause after running, if run with the IDE.
You'll need to ask in one of the Microsoft-related newsgroups why yours
doesn't.

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h|
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>
Feb 27 '08 #4

"Mike" <Su********@gmail.comwrote in message
news:91**********************************@s19g2000 prg.googlegroups.com...
Hi

I would like to use microsoft visual studio to compile a C program.
Does somebody know how to compile, link and run it?
I create a project and add a program to it.
I press F5 to start debug (because I cannot find any command to run,
why?).
You'd have to ask Microsoft that one. The IDE is rather fiddly to use,
though quite powerful when you get used to it.
>
A console window just appears and close very quickly.
How can I pause the console window?
Call getchar() before your program exits. This forces it to read input from
stdin, or keyboard.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
Feb 27 '08 #5
Mike wrote:
>
Hi

I would like to use microsoft visual studio to compile a C program.
Does somebody know how to compile,
Ctrl F7
link
F7
and run it?
I create a project and add a program to it.
I press F5 to start debug
(because I cannot find any command to run, why?).
A console window just appears and close very quickly.
How can I pause the console window?
Don't run the program from the MSVC console window.
Open another window from outside of MSVC,
and cd (change directory) to where the executable files wind up,
amd run your programs from there.

--
pete
Feb 27 '08 #6
pete said:
Mike wrote:
>>
Hi

I would like to use microsoft visual studio to compile a C program.
Does somebody know how to compile,

Ctrl F7
>link

F7
Well, I'm not about to fire up a Windows machine to check, but ISTR that
the exact keypresses may depend on which keyboard bindings you selected
when you installed VS. The reason I use weasel words like "may" is that I
may be disremembering - it may only be the editor itself to which these
choices apply.
>
>and run it?
I create a project and add a program to it.
I press F5 to start debug
(because I cannot find any command to run, why?).
A console window just appears and close very quickly.
How can I pause the console window?

Don't run the program from the MSVC console window.
Good advice, but there is an alternative: Ctrl-F5 (or whatever), which runs
the program outside the debugger and displays the legend "Press any key to
continue" (or some trivial variant thereof) when the program terminates.
Open another window from outside of MSVC,
A console window, that is. In modern Windowses, this can be done by
pressing Windows-R and entering the command

cmd

In older Windowses, the command is

command
and cd (change directory) to where the executable files wind up,
amd run your programs from there.
Right. Note that the executable files tend to be created in subdirectories
of the development directory, with the default names "debug" or "release",
depending on whether you're building a debug version or a release version.

Might I suggest that any further discussion of this stuff more properly
belongs in comp.os.ms-windows.programmer.win32 or one of the Microsoft
groups?

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Feb 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
1
by: Novice | last post by:
Hi all, I am a C++ and Java developer with over 3 years of industry experience. I've written low level C++ code, in addition to web clients that use web services. I've just recently installed the...
1
by: Novice | last post by:
Hi all, I'm afraid this is the second posting of this information as I didn't get a response on the previous post. I will try to shorten my message (i.e. be more concise) in the hopes that it will...
0
by: tel4 | last post by:
Microsoft Visual Studio Tools for the Microsoft Office System 2003 Microsoft Corp. DATE......: 03-10-2003 TYPE......: Application OS........: WinALL DiSKS.....: xx/02 PROTECTiON : NONE/RETAiL...
4
by: wASP | last post by:
Hi, I am contemplating the purchase of Microsoft Visual Studio .NET, and I've noticed that the prices range anywhere from $200 to $600 USD:...
7
by: David P. Donahue | last post by:
Greetings, I'm using a relatively old release of Visual Studio .NET and am running into a compatability problem with one of my ASP .NET websites. From what I've gathered from support of the...
182
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
0
by: fiona | last post by:
Innovasys Ltd., a leader in help authoring and documentation tools, today announced the inclusion of a tailored version of the Innovasys HelpStudio help authoring product, HelpStudio Lite, in the...
7
by: =?Utf-8?B?UHJhamFrdGE=?= | last post by:
We have an application build on Microsoft Visual Studio 2002 .Net 1.0 ie on 32 bit. Can we port the same application for .NET 2.0. Does .NET 2.0 is supported on Microsoft Visual studio 2002 ie for...
0
by: _Who | last post by:
I'm trying to free up some space on my system disk. In Add or Remove Programs I see: Microsoft Windows SDK for Visual Studio 2008 .NET Framework Tools Microsoft Windows SDK for Visual Studio...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.