473,385 Members | 1,766 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,385 software developers and data experts.

That's odd...

Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"

Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )

Thanks in advance.
Jun 27 '08 #1
17 1231
In article <2e**********************************@b5g2000pri.g ooglegroups.com>,
<ap******@gmail.comwrote:
>Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"

Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )
The people in comp.os.ms-windows.programmer.win32 are probably the best
ones to answer questions like that.
dave

--
Dave Vandervies dj3vande at eskimo dot com
If I had to choose one or the other, though, I'd choose Sedgewick (mainly on
the grounds that I have a dozen copies of "C Unleashed" on my shelf already).
--Richard Heathfield in comp.lang.c
Jun 27 '08 #2
ap******@gmail.com wrote:
Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"

Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )

Thanks in advance.
In the save as dialog, drop down the "Save as type..." and select "C source
file (.C)"

--
Jim Langston
ta*******@rocketmail.com
Jun 27 '08 #3
On May 3, 11:47*pm, dj3va...@csclub.uwaterloo.ca.invalid wrote:
In article <2e106ea9-d394-4816-bb26-30e209fff...@b5g2000pri.googlegroups.com>,

*<apati...@gmail.comwrote:
Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"
Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )

The people in comp.os.ms-windows.programmer.win32 are probably the best
ones to answer questions like that.

dave

--
Dave Vandervies * * * * * * * * * * * * * * * * * *dj3vande at eskimo dot com
If I had to choose one or the other, though, I'd choose Sedgewick (mainly on
the grounds that I have a dozen copies of "C Unleashed" on my shelf already).
* * * * * * * * * * * * * * * * * * * * * --Richard Heathfield in comp.lang.c
Here we go again ;-) (Told ya!)
Why would I want to go all across town to the "Organic Natural foods
store"
when I can buy my cup of coffee at 7/11 around the corner?
Jun 27 '08 #4
On May 4, 12:11*am, "Jim Langston" <tazmas...@rocketmail.comwrote:
apati...@gmail.com wrote:
Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"
Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )
Thanks in advance.

In the save as dialog, drop down the "Save as type..." and select "C source
file (.C)"

--
Jim Langston
tazmas...@rocketmail.com
Jim Langston, I'll get bet to you in a bit, as soon as I will check
another option,
so far, the problem is, the only way I succeeded in compiling a file
(which was a .cpp file)
was when I've used the feature "Precompiled Header File", and this one
seems to be a ".cpp" Header File.
I will try to see if I can skip this step, so I might be able to save
my hello.c file
in a proper format (.c)
I can't remember all the steps I've used when I failed before to "save
as .c"
(which became .c.cpp anyhow) so I could follow-up with you, Jim,
but I will retry it.
Jun 27 '08 #5
ap******@gmail.com said:
On May 3, 11:47 pm, dj3va...@csclub.uwaterloo.ca.invalid wrote:
<asinine IDE question snipped>
>The people in comp.os.ms-windows.programmer.win32 are probably the best
ones to answer questions like that.

Here we go again ;-) (Told ya!)
Why would I want to go all across town to the "Organic Natural foods
store"
when I can buy my cup of coffee at 7/11 around the corner?
It seems that when your previous arrogant, hostile, offensive, and
incidentally off-topic question was met with indifference from everyone
except our resident trolls, you learned nothing from the experience. Your
analogy, by the way, is broken. The comp.os.ms-windows.programmer.win32
newsgroup Dave mentioned is far more like a 7-11 for all MS programming
questions than comp.lang.c could ever be.

For as long as you continue to fail to understand Usenet, you'll continue
to get pleasant, smugly sympathetic, and almost always *wrong* answers
from the group's trolls, and not much else. If you want expert answers,
ask experts. Expertise in driving the Microsoft IDE is far more likely to
be shown in comp.os.ms-windows.programmer.win32 than it is here.

Incidentally, if you don't already *know* the answer to your question (and
just about any Notepad power-user does know), you may need to spend a few
more months or even years using Windows before you're ready to start
programming for it.

--
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
Jun 27 '08 #6
On May 3, 11:43*pm, apati...@gmail.com wrote:
Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"

Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )

Thanks in advance.
Finally, I solved the problem.
I will perhaps create a youtube video tutorial for others, later on.
Here is what I initially didn't noticed:
First, you've got to click File-New-Project
then under "Project Type" highlight Win32
under Templates (on the right side) highlight Win32 Console
Application
then enter a name of your project let's say "Test1" than click ok
then click "Next"
Under Application Type leave "Console Application"
Under Additional Options "Empty Project", then click "Finish"
then, on the left side, under "Solution project"
right click on "Source File" click Add new item
here in the name enter "main.c" or some other name (make sure you
delete pp from .cpp), leave "Location" as it is there
here under "Categories" leave Visual C++ and on the right side, under
"Templates" click on "C++ File (.cpp)
click "add"
and now on the right side paste your code (for ex
#include <stdio.h>

main()
{
printf("hello, world\n");
}

then click on "Build Solution" under "Build"
and finally, click on "Start without Debugging" under "Debug"
and you'll get the command prompt with "Hello, world"

I hope this helps any other usenet folks using Vista or
M Visual C++ (or both)
"
Jun 27 '08 #7
On May 4, 1:45*am, Richard Heathfield <r...@see.sig.invalidwrote:
apati...@gmail.com said:
On May 3, 11:47 pm, dj3va...@csclub.uwaterloo.ca.invalid wrote:

<asinine IDE question snipped>
The people in comp.os.ms-windows.programmer.win32 are probably the best
ones to answer questions like that.
Here we go again ;-) (Told ya!)
Why would I want to go all across town to the "Organic Natural foods
store"
when I can buy my cup of coffee at 7/11 around the corner?

It seems that when your previous arrogant, hostile, offensive, and
incidentally off-topic question was met with indifference from everyone
except our resident trolls, you learned nothing from the experience. Your
analogy, by the way, is broken. The comp.os.ms-windows.programmer.win32
newsgroup Dave mentioned is far more like a 7-11 for all MS programming
questions than comp.lang.c could ever be.

For as long as you continue to fail to understand Usenet, you'll continue
to get pleasant, smugly sympathetic, and almost always *wrong* answers
from the group's trolls, and not much else. If you want expert answers,
ask experts. Expertise in driving the Microsoft IDE is far more likely to
be shown in comp.os.ms-windows.programmer.win32 than it is here.

Incidentally, if you don't already *know* the answer to your question (and
just about any Notepad power-user does know), you may need to spend a few
more months or even years using Windows before you're ready to start
programming for it.

--
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
Well, I guess I've made my own coffee this time, (but don't tell
anyone that I've used some
tiny bit of half/half cream with it, all natural.- just kidding)
Jun 27 '08 #8
why so much trouble?
here is a nice video tutorial:
http://msdn.microsoft.com/en-ca/visualc/bb530677.aspx

On May 4, 2:10*am, apati...@gmail.com wrote:
On May 3, 11:43*pm, apati...@gmail.com wrote:
Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"
Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )
Thanks in advance.

Finally, I solved the problem.
I will perhaps create a youtube video tutorial for others, later on.
Here is what I initially didn't noticed:
First, you've got to click File-New-Project
then * under "Project Type" highlight Win32
under Templates (on the right side) highlight Win32 Console
Application
then enter a name of your project let's say "Test1" than click ok
then click "Next"
Under Application Type leave "Console Application"
Under Additional Options "Empty Project", then click "Finish"
then, on the left side, under "Solution project"
right click on "Source File" click Add new item
here in the name enter "main.c" or some other name (make sure you
delete pp from .cpp), leave "Location" as it is there
here under "Categories" leave Visual C++ and on the right side, under
"Templates" click on "C++ File (.cpp)
click "add"
and now on the right side paste your code (for ex
#include <stdio.h>

*main()
{
* * * * printf("hello, world\n");

}

then click on "Build Solution" under "Build"
and finally, click on "Start without Debugging" under "Debug"
and you'll get the command prompt with "Hello, world"

I hope this helps any other usenet folks using Vista or
M Visual C++ (or both)
"
Jun 27 '08 #9
Hello,

ap******@gmail.com wrote:
On May 4, 12:11 am, "Jim Langston" <tazmas...@rocketmail.comwrote:
>apati...@gmail.com wrote:
>>Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"
Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )
Thanks in advance.
In the save as dialog, drop down the "Save as type..." and select "C source
file (.C)"

--
Jim Langston
tazmas...@rocketmail.com

Jim Langston, I'll get bet to you in a bit, as soon as I will check
another option,
so far, the problem is, the only way I succeeded in compiling a file
(which was a .cpp file)
was when I've used the feature "Precompiled Header File", and this one
seems to be a ".cpp" Header File.
I will try to see if I can skip this step, so I might be able to save
my hello.c file
in a proper format (.c)
I can't remember all the steps I've used when I failed before to "save
as .c"
(which became .c.cpp anyhow) so I could follow-up with you, Jim,
but I will retry it.
Make sure that, when you create a project, you make it an empty project without
precompiled header files. They are of no need when just programming C.

When that's done you should be able to create a new source file and just make
sure you save it as a .c file. (Typing the extension alone works for me). Another
thing you might want to do is to change one of the project settings (under C/C++
- Advanced) to "Compile as C code". I have found that it might cause issues when
compiling it as C++ code.

Also note that VS2008 does not support all the C99 features like a simple boolean
type and it will throw a lot of warnings where it has it's own implementations of
certain functions (like strcpy -strcpy_s).
When you want to redistribute your application you will also have to make sure
people have the C runtime libraries (vcredist) of which you can find downloads on
the MSDN website.

- Jensen

Jun 27 '08 #10
On May 4, 1:10 pm, apati...@gmail.com wrote:
On May 3, 11:43 pm, apati...@gmail.com wrote:
Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"
Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )
Thanks in advance.

Finally, I solved the problem.
Umm with bit of divine help ;)
I will perhaps create a youtube video tutorial for others, later on.
Here is what I initially didn't noticed:
First, you've got to click File-New-Project
then under "Project Type" highlight Win32
under Templates (on the right side) highlight Win32 Console
Application
then enter a name of your project let's say "Test1" than click ok
then click "Next"
Under Application Type leave "Console Application"
Under Additional Options "Empty Project", then click "Finish"
then, on the left side, under "Solution project"
right click on "Source File" click Add new item
here in the name enter "main.c" or some other name (make sure you
delete pp from .cpp), leave "Location" as it is there
here under "Categories" leave Visual C++ and on the right side, under
"Templates" click on "C++ File (.cpp)
click "add"
and now on the right side paste your code (for ex
#include <stdio.h>

main()
{
printf("hello, world\n");

}

then click on "Build Solution" under "Build"
and finally, click on "Start without Debugging" under "Debug"
and you'll get the command prompt with "Hello, world"

I hope this helps any other usenet folks using Vista or
M Visual C++ (or both)
"
Jun 27 '08 #11
ap******@gmail.com wrote:

Why would I want to go all across town to the "Organic Natural foods
store"
when I can buy my cup of coffee at 7/11 around the corner?
*plonk*


Brian
Jun 27 '08 #12
On May 4, 7:56*am, newbie.u...@gmail.com wrote:
On May 4, 1:10 pm, apati...@gmail.com wrote:
On May 3, 11:43 pm, apati...@gmail.com wrote:
Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
I still can't figure out how to compile a ".c" file, since
every time I do it, the extension is changed to ".c.cpp"
Any tips? (I mean here, those folks that have been used Visual C++
before, because I need
some advice on concrete terms, such as: "go to View-Other Windows- etc
etc" than click here, etc )
Thanks in advance.
Finally, I solved the problem.

Umm with bit of divine help ;)
I will perhaps create a youtube video tutorial for others, later on.
Here is what I initially didn't noticed:
First, you've got to click File-New-Project
then * under "Project Type" highlight Win32
under Templates (on the right side) highlight Win32 Console
Application
then enter a name of your project let's say "Test1" than click ok
then click "Next"
Under Application Type leave "Console Application"
Under Additional Options "Empty Project", then click "Finish"
then, on the left side, under "Solution project"
right click on "Source File" click Add new item
here in the name enter "main.c" or some other name (make sure you
delete pp from .cpp), leave "Location" as it is there
here under "Categories" leave Visual C++ and on the right side, under
"Templates" click on "C++ File (.cpp)
click "add"
and now on the right side paste your code (for ex
#include <stdio.h>
*main()
{
* * * * printf("hello, world\n");
}
then click on "Build Solution" under "Build"
and finally, click on "Start without Debugging" under "Debug"
and you'll get the command prompt with "Hello, world"
I hope this helps any other usenet folks using Vista or
M Visual C++ (or both)
"- Hide quoted text -

- Show quoted text -
Yeah, I know, I should start a Church of C and preach every Sunday
morning programming in C language
Jun 27 '08 #13
ap******@gmail.com wrote:
>
.... big snip ...
>
Yeah, I know, I should start a Church of C and preach every Sunday
morning programming in C language
More practical, you should learn to snip quotation portions that
are not relevant to your reply.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **
Jun 27 '08 #14
On May 5, 12:29*am, CBFalconer <cbfalco...@yahoo.comwrote:
apati...@gmail.com wrote:

... big snip ...
Yeah, I know, I should start a Church of C and preach every Sunday
morning programming in C language

More practical, you should learn to snip quotation portions that
are not relevant to your reply.

--
*[mail]: Chuck F (cbfalconer at maineline dot net)
*[page]: <http://cbfalconer.home.att.net>
* * * * * * Try the download section.

** Posted fromhttp://www.teranews.com**
Sorry but I use googlegroups so here its a different option, "more" or
"hide"
OK, I will try to delete the above content, but in most cases I may
need it anyway since I'm responding to it.
Jun 27 '08 #15
ap******@gmail.com writes:
On May 5, 12:29*am, CBFalconer <cbfalco...@yahoo.comwrote:
>apati...@gmail.com wrote:

... big snip ...
Yeah, I know, I should start a Church of C and preach every Sunday
morning programming in C language

More practical, you should learn to snip quotation portions that
are not relevant to your reply.

--
*[mail]: Chuck F (cbfalconer at maineline dot net)
*[page]: <http://cbfalconer.home.att.net>
* * * * * * Try the download section.

** Posted fromhttp://www.teranews.com**

Sorry but I use googlegroups so here its a different option, "more" or
"hide"
OK, I will try to delete the above content, but in most cases I may
need it anyway since I'm responding to it.
As I understand it, the "more" and "hide" options control what you see
when reading an article, not what's included when you post a followup.

In any case, you certainly weren't responding to Chuck's signature
(the stuff following the "-- " delimiter).

You need to *manually* delete parts of the previous article that
aren't relevent to your followup.

--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 27 '08 #16
ap******@gmail.com wrote:
CBFalconer <cbfalco...@yahoo.comwrote:
>apati...@gmail.com wrote:

... big snip ...
>>Yeah, I know, I should start a Church of C and preach every
Sunday morning programming in C language

More practical, you should learn to snip quotation portions
that are not relevant to your reply.

Sorry but I use googlegroups so here its a different option,
"more" or "hide". OK, I will try to delete the above content,
but in most cases I may need it anyway since I'm responding to
it.
Google shmoogle. Mark a section, and press the 'delete' key. Note
that I deleted the quoted sig.

Better yet, get a real newsreader and newsserver.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **
Jun 27 '08 #17
On Mon, 5 May 2008 11:25:11 UTC, ap******@gmail.com wrote:
Sorry but I use googlegroups so here its a different option, "more" or
"hide"
OK, I will try to delete the above content, but in most cases I may
need it anyway since I'm responding to it.
No, there are enough newsreaders and newsservers around that nobody
who has brain for only 2 cent has a need to go through google to use
something that is not designed to work on newsgrous. Anybody who
useses googlegroups is knows as a twit gets automagically filtered by
many of the users of usenet.

--
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2R Deutsch ist da!
Jun 27 '08 #18

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

Similar topics

1
by: sentinel | last post by:
Hi, I'm currently writing a mulit-page form app that uses a session to retain data from each form element in order for the user to jump between pages, then the final data is passed to a calculation...
2
by: ChronicFatigue | last post by:
Given that some browsers dont have javascript enabled.... do developers try to avoid using javascript when a php alternative can be used? What sort of alternative php scripts are often used?
1
by: Timothy Rue | last post by:
I found the online and free PHP manual(s) but what I need is one that is plain text/ascii Is there such a beast and if not what is the closest to it? I'd like to do my own markup on it. ...
5
by: Nick Bartos | last post by:
I am looking for an open source php accelerator that works in cgi mode. I am guessing that to do that the cache would have to be on disk and not in memory. I was looking at the turk accelerator...
2
by: Martien van Wanrooij | last post by:
I am rather new at php so the answer to my question could be somewhere on the web but unfortunately I couldn't find it until now. I am using a form that is sent to me by email with the following...
4
by: Randell D. | last post by:
Folks, I use PHP to write my form data to MySQL. I have a database with about ten tables. I'm trying to fill one table with some dummy data (its a contact manager table holding names of...
3
by: simonc | last post by:
I'm getting incoming emails to activate a PHP script, not web page requests - so I can't visibly see things with a browser. Is there any way I can detect if one of my PHP scripts never exits -...
5
by: Beef Erikson | last post by:
Heya :) Ok... I've been thinking of a way to go about doing this, and I think I might have came up with it. Just wanting to run this by you guys, see what you think. Here's my setup: I...
3
by: Stijn Goris | last post by:
hi all, Does a function excist that converts a string to a string thats compatible with linux file system? kind regards Stijn
7
by: Jayne Wolps | last post by:
Hello I wonder if anyone can help. I would like to know how certain sites: http://aboutbritain.com/ArundelCastle.htm, and http://travel.knowhere.co.uk/place/+bristol-0/ manage to put approx...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.