Hello --
1. Can you compile C code in Visual Studio.NET ?
If so, can you please submit the proper steps in order to do this.
Thank You
:)
Hello --
1. Can you compile C code in Visual Studio.NET ?
If so, can you please submit the proper steps in order to do this.
Thank You
:)
Yes, you can. Go to Project and Properties, then somewhere in the myriad of options you'll see "Compile as C++" where you can change it to "Compile as C". And while you're at it, change the source file extension to .c instead of .cpp.
Narue--
Thank you very very much for answering my post!
:)
Where do I find the Project and Properties tab/menu? I used to wrote C in Unix before, but now I don't have access to Unix computer anymore. Do we do the compiling using the "Start Debugging" menu? Tq.
Yes, you can. Go to Project and Properties, then somewhere in the myriad of options you'll see "Compile as C++" where you can change it to "Compile as C". And while you're at it, change the source file extension to .c instead of .cpp.
>Where do I find the Project and Properties tab/menu?
On the main menu is a menu item called "Project". Under that is another menu item called "<your project name> Properties".
>Do we do the compiling using the "Start Debugging" menu?
I don't waste my time with the menus. I use Ctrl+F7 to compile, Ctrl+F5 to run in the debugger, and F5 to run outside of the debugger.
Where do I find the Project and Properties tab/menu? I used to wrote C in Unix before, but now I don't have access to Unix computer anymore. Do we do the compiling using the "Start Debugging" menu? Tq.
Go to View Menu select Solution Explorer or CTRL+ ALT +L
Then Select The project that your are developing and right click on that.
Then select the Properties from the submenu.
Then select the Configuration properties from the Tree structure. under that select C/C++ then select Advanced. Now in the right side pane change the property
Compile As from Compile as C++ Code (/TP) to Compile as C Code (/TC)
Finally change your file extensions to .c
Now you configured you Visual Studio to compile C programs
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World21"<<endl;
return 0;
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.