aspose file tools*
The moose likes C / C++ and the fly likes which is the forum for c language? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » C / C++
Bookmark "which is the forum for c language? " Watch "which is the forum for c language? " New topic
Author

which is the forum for c language?

Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
???


Do What You Wanna Be....Taking Things The Way They Come
scjp 1.6 91 percent, scmad 90 percent(rounded off to nearest integer)
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

This one !
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
alright....i want to start programming for c...i have installed cygwin...what should i do now?
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Code
Seriously, what do you mean by "what should I do now"?
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
dude i mean...how do i use cygwin? what editor to use? how to compile a program..how to run it?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19004
    
  40

Ankur Jain Kothari wrote:dude i mean...how do i use cygwin?


What cygwin does is make your windows command shell behave like unix. To ask how to use cygwin, is like asking how to use unix, and of course, can't be answered in a single topic. Maybe you can pick up a good book on unix.

Ankur Jain Kothari wrote:what editor to use?


That's completely up to you. Cygwin doesn't disable the windows tools, so you are free to use the editors that you are currently comfortable with.


Ankur Jain Kothari wrote:how to compile a program..how to run it?


First, you need to make sure that cygwin actually installed the c compiler. Then, I recommend that you also install the man pages for the c compiler. With the man pages installed, you can try "man cc", to get full information about the c compiler. Another option is to pick up a book about the gnu c compiler.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Henry Wong wrote:What cygwin does is make your windows command shell behave like unix. To ask how to use cygwin, is like asking how to use unix, and of course, can't be answered in a single topic. Maybe you can pick up a good book on unix.
....
Another option is to pick up a book about the gnu c compiler.


All good recommendations. Also many here have had no problem running Cygwin and the gnu C compiler by studying the online documentation and downloadable help files that these great tools have available. They're decent and pretty complete.

Much luck!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39885
    
  28
You can also download C compilers and IDEs which work on Windows. I like the IDE you can get from http://www.bloodshed.net/.
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Campbell Ritchie wrote:You can also download C compilers and IDEs which work on Windows. I like the IDE you can get from .....


Is your link correct? Thanks!
Pradip Bhattacharya
Greenhorn

Joined: Dec 05, 2008
Posts: 23
if you just want to learn C and your are using windows, then you can go for Microsoft Visual C++ 2008 Express Edition http://www.microsoft.com/express/Downloads/#2008-Visual-CPP (which is for free) .


Pradip.B
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Pradip Bhattacharya wrote:if you just want to learn C and your are using windows, then you can go for Microsoft Visual C++ 2008 Express Edition http://www.microsoft.com/express/Downloads/#2008-Visual-CPP (which is for free) .


NO! Not the evil empire! (joking!).

For some reason I do have an aversion to using MS products, perhaps because I was a Borland aficionado from way-back. Myself, I've used gnu-C/MinGW along with Notepad++ when learning to create JNI code.
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
could you show me the most basic way of using a compiler with a notepad++ please...i dont want to use netbeans or eclipse...something similar to using javac java on command prompt.....that is...the true form
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Ankur Jain Kothari wrote:could you show me the most basic way of using a compiler with a notepad++ please...i dont want to use netbeans or eclipse...something similar to using javac java on command prompt.....that is...the true form


Sorry, but I'm no C pro and it's been a couple of years since I've worked with this, so for me to recall this to show you how to use it, I'd have to first do what you need to do: read the docs and play with it. Believe me, if I could get it to work, anyone can.
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
i am downloading mingw...ok..i will look through the doc then
Pradip Bhattacharya
Greenhorn

Joined: Dec 05, 2008
Posts: 23
pete stein wrote:NO! Not the evil empire! (joking!)

I can understand why you termed it as an 'evil empire' . But its really an excellent IDE. Good code highlighting,debugging.
And I love Notepad++. Used it in numerous projects. From web development to game development.
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
there is only visual studio c++....can i run c programs there?
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Ankur Jain Kothari wrote:there is only visual studio c++....can i run c programs there?


Yes.
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
i have download the mingw compiler...i have created a c program test.c....compiled it using gcc test.c

but now how do i run it?
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Ankur Jain Kothari wrote:i have download the mingw compiler...i have created a c program test.c....compiled it using gcc test.c


Have you linked it yet?
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
what does linking mean?
i created a test.c file...compiled it using gcc test.c
in that folder am getting some output file with a name 'a'
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Ankur Jain Kothari wrote:what does linking mean?
i created a test.c file...compiled it using gcc test.c
in that folder am getting some output file with a name 'a'


I'm not sure as again it's been a long time. What commands are you using when you compile? -c? -o? I think the -o links the compiled code into an executable. Again, the docs and Google should help out here.
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
ya i got it..
if i use gcc test.c the executable created is a.out
i have to use gcc -o test test.c
and then run the test file
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
thanks a lot sir for your time

i hav downloaded visual c++...how do i create a c program? do i create a new c++ file and instead create a c file in it? maybe..let me try
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Ankur Jain Kothari wrote:thanks a lot sir for your time


Thanks for helping me to stretch some brain cells that haven't been exercised in a while.
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
your welcome..
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39885
    
  28
If you don't use the -o tag you simply invoke your code with ./a.out or similar.
 
 
subject: which is the forum for c language?