What's new

Compiling ad running C programs in VS.NET

Moose Jr.

Raging Moose
Weird question:
I'm taking my first language class (C) and my professor wants me to create programs at home but unfortunately I can't get VS.NET to compile and run, let alone create, a C program. In class he said something about C being a subset of C++, so I tried creating a C++ program and simply writing it to that, but I can only get an error about the header file. So the question is: is it possible for me to write and compile C code in VS.NET? Or do I need 6.0 or a free compiler for that?

BTW, if anyone tells you it's not culture shock to go from VB to C, kick him hard in pelvic area for me.
 
OP
Moose Jr.

Moose Jr.

Raging Moose
I think I worked it out. I created an empty C++ win32 app and then added the necessary header files and a blank text file with the .c extension. I've been able to build, compile, step and all that crud without problems. Is this because c is a subset of C++ like my professor said?
 

mesman00

What's that...?
Moose Jr. said:
I think I worked it out. I created an empty C++ win32 app and then added the necessary header files and a blank text file with the .c extension. I've been able to build, compile, step and all that crud without problems. Is this because c is a subset of C++ like my professor said?

what type of program are you trying to create. if this is your first ever c course it would make sense to me that you should be creating win32 console applications (command prompt) instead of win32 applications. C++ is built on the C programming language. However, unlike C, C++ is an object orientated programming language, among other differences.
 

Eagle

aka Alshain
Moderator
I dont know what mesman is talking about but C++ will run command line programming. C++ is merely C with ADDED SUPPORT for OOP and a few other things like some sytax changes. Pretty much all C++ compilers will run C code anyways. You shouldnt be using C# to make C++ projects anyway. C# was designed to make web scripts not applications. You need to using Visual Studio 6 for applications. Or better yet, drop visual studio all together and find you a real compiler.
 
Last edited:

Doomulation

?????????????????????????
1) Source code with c extension are compiled as C code; this may also be changed, however, but it's easier this way.
2) .Net can easily be used applications not meant for the web, too. And we've even seen examples of it (1964 .net anyone?).
3) C# was designed as a high level language of c++ without sacrificing the power of c++; it wasn't specifically meant for the net.
4) Although visual studio is ms specific, doesn't mean it's not a real compiler.
 

mesman00

What's that...?
Eagle said:
I dont know what mesman is talking about but C++ will run command line programming. C++ is merely C with ADDED SUPPORT for OOP and a few other things like some sytax changes. Pretty much all C++ compilers will run C code anyways. You shouldnt be using C# to make C++ projects anyway. C# was designed to make web scripts not applications. You need to using Visual Studio 6 for applications. Or better yet, drop visual studio all together and find you a real compiler.

*spam* that's what i said, but he was creating a win32 app (windows all that shit), i told him to create a win32 console app (command line/promt). *spam*
 

Top