That's odd...

  • Follow


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.
0
Reply apaticul (18) 5/4/2008 5:43:50 AM

In article <2e106ea9-d394-4816-bb26-30e209fff946@b5g2000pri.googlegroups.com>,
 <apaticul@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 )

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
0
Reply dj3vande3 (264) 5/4/2008 5:47:05 AM


apaticul@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
tazmaster@rocketmail.com 


0
Reply tazmaster (2359) 5/4/2008 6:11:23 AM

On May 3, 11:47=A0pm, dj3va...@csclub.uwaterloo.ca.invalid wrote:
> In article <2e106ea9-d394-4816-bb26-30e209fff...@b5g2000pri.googlegroups.c=
om>,
>
> =A0<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 )
>
> The people in comp.os.ms-windows.programmer.win32 are probably the best
> ones to answer questions like that.
>
> dave
>
> --
> Dave Vandervies =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0dj3vande 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 alread=
y).
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 --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?
0
Reply apaticul (18) 5/4/2008 6:13:39 AM

On May 4, 12:11=A0am, "Jim Langston" <tazmas...@rocketmail.com> wrote:
> 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 sourc=
e
> 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.
0
Reply apaticul (18) 5/4/2008 6:22:00 AM

apaticul@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
0
Reply rjh (10789) 5/4/2008 7:45:54 AM

On May 3, 11:43=A0pm, 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)
"
0
Reply apaticul (18) 5/4/2008 8:10:43 AM

On May 4, 1:45=A0am, Richard Heathfield <r...@see.sig.invalid> wrote:
> 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)
0
Reply apaticul (18) 5/4/2008 8:36:33 AM

why so much trouble?
here is a nice video tutorial:
http://msdn.microsoft.com/en-ca/visualc/bb530677.aspx

On May 4, 2:10=A0am, apati...@gmail.com wrote:
> On May 3, 11:43=A0pm, 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 =A0 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>
>
> =A0main()
> {
> =A0 =A0 =A0 =A0 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)
> "

0
Reply apaticul (18) 5/4/2008 8:50:41 AM

Hello,

apaticul@gmail.com wrote:
> On May 4, 12:11 am, "Jim Langston" <tazmas...@rocketmail.com> wrote:
>> 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

0
Reply jensen.somers (33) 5/4/2008 9:53:48 AM

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)
> "

0
Reply newbie.unix (7) 5/4/2008 1:56:39 PM

apaticul@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
0
Reply defaultuserbr (3657) 5/4/2008 7:14:57 PM

On May 4, 7:56=A0am, 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 =A0 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>
>
> > =A0main()
> > {
> > =A0 =A0 =A0 =A0 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
0
Reply apaticul (18) 5/5/2008 3:22:08 AM

apaticul@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 **
0
Reply cbfalconer (19183) 5/5/2008 6:29:31 AM

On May 5, 12:29=A0am, CBFalconer <cbfalco...@yahoo.com> wrote:
> 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.
>
> --
> =A0[mail]: Chuck F (cbfalconer at maineline dot net)
> =A0[page]: <http://cbfalconer.home.att.net>
> =A0 =A0 =A0 =A0 =A0 =A0 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.
0
Reply apaticul (18) 5/5/2008 11:25:11 AM

apaticul@gmail.com writes:
> On May 5, 12:29�am, CBFalconer <cbfalco...@yahoo.com> wrote:
>> 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) <kst-u@mib.org>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
0
Reply kst-u (21549) 5/5/2008 4:31:13 PM

apaticul@gmail.com wrote:
> CBFalconer <cbfalco...@yahoo.com> wrote:
>> 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 **
0
Reply cbfalconer (19183) 5/5/2008 10:43:03 PM

On Mon, 5 May 2008 11:25:11 UTC, apaticul@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!
0
Reply os2guy1 (1071) 5/6/2008 7:01:56 PM

17 Replies
46 Views

(page loaded in 0.161 seconds)


Reply: