Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

using C sourcecode?
This is going to seem like a braindead, overly simple question to most
people, but I'm going to ask it anyway since I'm somewhat baffled...

I've got the academic version of Visual Studio .net.  I'm a programming
student, and got the software from a friend who no longer needed it, so I've
got all the CD's, including the rather extensive MSDN documentation library.
I've also never used the program before, and only just installed it.  At the
moment, I'm learning C at school, but whenever I open a new console
application project under Visual Studio, it defaults to C++, without the
option of changing the language.  Since I don't actually know C++, I'd like
to be able to change that to C instead.  The other two IDEs I've fiddled
around with give the option, so I'd be very surprised if this one didn't.

None of the help files that came with the software have any useful
information on this issue, and the two books that came with it are a less
than useless.

Anyway, if anyone could help me out with this one, I'd definitely appreciate
it.



Report this thread to moderator Post Follow-up to this message
Old Post
Paul Fedorenko
09-12-04 08:56 AM


Re: using C sourcecode?
Excerpt for some very esoteric features, you can look at C++ simply as C
with more features.  Nearly about everything you write in C will run the
same under a C++ compiler.  (However, the inverse is quite not true.)

S. L.

"Paul Fedorenko" <pfedorenko@look.ca> wrote in message
news:eaY5SHImEHA.3288@TK2MSFTNGP10.phx.gbl...
> This is going to seem like a braindead, overly simple question to most
> people, but I'm going to ask it anyway since I'm somewhat baffled...
>
> I've got the academic version of Visual Studio .net.  I'm a programming
> student, and got the software from a friend who no longer needed it, so
> I've got all the CD's, including the rather extensive MSDN documentation
> library. I've also never used the program before, and only just installed
> it.  At the moment, I'm learning C at school, but whenever I open a new
> console application project under Visual Studio, it defaults to C++,
> without the option of changing the language.  Since I don't actually know
> C++, I'd like to be able to change that to C instead.  The other two IDEs
> I've fiddled around with give the option, so I'd be very surprised if this
> one didn't.
>
> None of the help files that came with the software have any useful
> information on this issue, and the two books that came with it are a less
> than useless.
>
> Anyway, if anyone could help me out with this one, I'd definitely
> appreciate it.
>



Report this thread to moderator Post Follow-up to this message
Old Post
Sylvain Lafontaine
09-12-04 08:56 AM


Re: using C sourcecode?
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:eNz1dDJmEHA.3608@TK2MSFTNGP09.phx.gbl...
> Excerpt for some very esoteric features, you can look at C++ simply as C
> with more features.  Nearly about everything you write in C will run the
> same under a C++ compiler.  (However, the inverse is quite not true.)
>
> S. L.

So I can just put my C code into the .cpp file that VS opens up by default
with a new project, save it as a .cpp file, and it'll happily compile with
no problems?



Report this thread to moderator Post Follow-up to this message
Old Post
Paul Fedorenko
09-13-04 01:56 AM


Re: using C sourcecode?
Yes.

The difference that you will see about the name of the main point of entry
and of the inclusion of standard include files doesn't come because you are
compiling a C++ program instead of a C program but because it will run under
the Windows environment.

Also, don't mix .cpp with .c files: always use .cpp files only.

The reason for this is that C functions doesn't have the same internal names
inside the .OBJ and .DLL files than C++ functions and the linker won't be
able to correctly link your program into an EXE if you mix these two types
of convention without taking some extra steps.

By using only .CPP files, you will ensure to use the same internal naming
convention for all of your functions.  It won't make any difference on the
code that you can write.

Instead of C and of C++, which are old stuff, you should study C#: much more
easy, modern and powerful to begin with than C or C++.

S. L.

"Paul Fedorenko" <pfedorenko@look.ca> wrote in message
news:ek8jc6QmEHA.2380@TK2MSFTNGP14.phx.gbl...
>
> "Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
> wrote in message news:eNz1dDJmEHA.3608@TK2MSFTNGP09.phx.gbl... 
>
> So I can just put my C code into the .cpp file that VS opens up by default
> with a new project, save it as a .cpp file, and it'll happily compile with
> no problems?
>



Report this thread to moderator Post Follow-up to this message
Old Post
Sylvain Lafontaine
09-13-04 08:57 AM


Re: using C sourcecode?
> Instead of C and of C++, which are old stuff, you should study C#: much
> more easy, modern and powerful to begin with than C or C++.

Thanks for the info you posted.  As for this last comment, C and Java are
the languages being taught in the program I'm in at school.  The program's
all about telecom and networking, and there seems to be as much, if not
more, UNIX operating on the server side of things as the Windows NT family,
so it'd make sense that they pick programming languages that are pretty much
cross platform.  Since I have this bit, professional development application
at my disposal, though, I'm planning on taking a look at visual BASIC and C#
as well, just to see what they're all about, if nothing more.



Report this thread to moderator Post Follow-up to this message
Old Post
Paul Fedorenko
09-13-04 08:57 AM


Re: using C sourcecode?
Excerpt if you are dealing with very old stuff, you will find that even in
the UNIX and telecom/networking environment C++ will be used instead of C.
Many so called "C" programs are in fact C++ programs.

S. L.

"Paul Fedorenko" <pfedorenko@look.ca> wrote in message
news:uJu50wUmEHA.952@TK2MSFTNGP14.phx.gbl... 
>
> Thanks for the info you posted.  As for this last comment, C and Java are
> the languages being taught in the program I'm in at school.  The program's
> all about telecom and networking, and there seems to be as much, if not
> more, UNIX operating on the server side of things as the Windows NT
> family, so it'd make sense that they pick programming languages that are
> pretty much cross platform.  Since I have this bit, professional
> development application at my disposal, though, I'm planning on taking a
> look at visual BASIC and C# as well, just to see what they're all about,
> if nothing more.
>



Report this thread to moderator Post Follow-up to this message
Old Post
Sylvain Lafontaine
09-13-04 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Studio archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:11 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.