Ok, so here is the deal. I'm going to start programming in C in the next course at the uni... and since Windows (which I'm using) doesn't have any compiler for C and I didn't like using cygwin to be able to use gcc at all, VM ware is slow and I don't like jumping between partitions if I actually install linux on my computer. Anyway to solve that problem and lay som groundwork in knowlege of C/C++ I've got myself a Visual Studio Professional 2010 (luckily as a computing engineer student I get it for free) but I'm really lost when it comes to compieling and runing... and be able to write C programs because I don't see anything for C there, only C++, C#, VB, SQL and some other stuff I don't yet get... so could anyone familiar with this pls help me get things started? prepherebly in C not C++
14 replies to this topic
#1
Posted 21 August 2010 - 04:16 AM
|
|
|
#2
Posted 21 August 2010 - 04:37 AM
Roman Y said:
I've got myself a Visual Studio Professional 2010 (luckily as a computing engineer student I get it for free)
The Express Edition is free for everyone. ;)
Why don't you write your code in C and then compile it with MS's C++-compiler? I know that there are some differences, but basically it shouldn't matter.
If you want something like GCC, try MinGW. You can use it with IDEs like Code::Blocks or wxDev-C++.
Greets,
artificial
Sometimes words ain't enough to express something. That's why computer scientists use double words.
#3
Posted 21 August 2010 - 04:38 AM
minGW = GCC for Windows. Also, most C++ compilers also work as C compilers.
#4
Posted 21 August 2010 - 04:41 AM
C++ is supposed to have completely backwards compatibility to C. WinAPI for instance is written in C and do not as far as I know have any objects at all. But if Visual-C++ follows this too I don't know.
Anyway if you want to use GCC I recommend that you download and install Code::Blocks for windows with the included MinGW environment.
Anyway if you want to use GCC I recommend that you download and install Code::Blocks for windows with the included MinGW environment.
My Code Blog - My Github - Ascension Project - Madness Script Project - Simple-Garbage-Collector Project
There is bound to be something useful somewhere.
There is bound to be something useful somewhere.
#5
Posted 21 August 2010 - 05:06 AM
artificial said:
The Express Edition is free for everyone. ;)
well I've got professional edition cuz express wasn't even on the list (browsed at msdn e-academy) plus I figured, hey since it costs it should be somehow better...
and thanks for the tips and I'll try out this minGW to see what it is... I mainly created the thred to get help to figure out the VS environment.. I tryed the mdsn library but they gave me instructions of 2005 eddition and a lot of things were different...
#6
Posted 21 August 2010 - 05:26 AM
Roman Y said:
and thanks for the tips and I'll try out this minGW to see what it is... I mainly created the thred to get help to figure out the VS environment.. I tryed the mdsn library but they gave me instructions of 2005 eddition and a lot of things were different...
Well like I said. With Visual C++ you should be able to just write normal C code in it without having to worry that it is actually C++.
My Code Blog - My Github - Ascension Project - Madness Script Project - Simple-Garbage-Collector Project
There is bound to be something useful somewhere.
There is bound to be something useful somewhere.
#7
Posted 21 August 2010 - 05:31 AM
Yeah I tryed that... I had trouble compieling... and runing it... for the first I tryet running build, and compile, I've got some lines below... but I didn't get any output what so ever... (should've been "Hello world") so what do I do once I've written the program and want to compile and run it?
#8
Posted 21 August 2010 - 06:53 AM
Can you show us the code and whatever error you got? Remember to put it in [ CODE ] brackets (minus the spaces)
My Code Blog - My Github - Ascension Project - Madness Script Project - Simple-Garbage-Collector Project
There is bound to be something useful somewhere.
There is bound to be something useful somewhere.
#9
Posted 21 August 2010 - 07:39 AM
well the code was as simple as:
So I don't think there was any error there... I just didn't find a way to compile and run it in VS environment...
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello World!");
return 0;
}
So I don't think there was any error there... I just didn't find a way to compile and run it in VS environment...
#10
Posted 21 August 2010 - 08:00 AM
I think it's called Build in VS. So find something called Build & Run.
And you said something about not getting output? Might just be that you have to add a newline("\n") to the end of the string to printf()
And you said something about not getting output? Might just be that you have to add a newline("\n") to the end of the string to printf()
My Code Blog - My Github - Ascension Project - Madness Script Project - Simple-Garbage-Collector Project
There is bound to be something useful somewhere.
There is bound to be something useful somewhere.
#11
Posted 21 August 2010 - 08:48 AM
ok... finally figured out a bit of VS and could at least run a hello world... codes are basicly the same, but different libraries...
#12
Posted 21 August 2010 - 12:15 PM
Be aware that that program is likely to run, blink a command window, end, and close the command window. The flickering window could be too brief to notice.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









