Page 5 of 7
Re: [Tutorial] Introduction to programming using C
Posted: Thu Jul 07, 2011 12:33 pm
by m0skit0
xist wrote:As for the book, it's a beginners book and i know nothing....
IMHO C++ is not best language to start learning programming with.
xist wrote:(didn't get any errors btw...)
You shouldn't get any. I said "warning" not "error". And also you had to have your compiler set up properly to show all warnings (which I highly recommend).
Re: [Tutorial] Introduction to programming using C
Posted: Mon Sep 12, 2011 11:19 am
by venmalathy
Linux is quite easy to use, don't worry.
Re: [Tutorial] Introduction to programming using C
Posted: Thu Sep 22, 2011 5:49 pm
by nbl0mer
nice tuturial man , nice work , bravo !!! and thanx for the help
Re: [Tutorial] Introduction to programming using C
Posted: Sat Jul 07, 2012 1:27 am
by N6v7d8
Excuse me o,o
I would like to ask if there is a way to compile/run C using Command Prompt like Java?
and what should be the file extension when using notepad?
because I prefer using notepad.
Thank you

Re: [Tutorial] Introduction to programming using C
Posted: Sat Jul 07, 2012 2:46 am
by fate6
the extension would still be the same
also notepad ? really ?
well what ever but I would suggest notepad++ (or better yet use a Linux Distro)
now as for CMD IDK since I dont code on Windows, sorry :/
(more like fail to code :3)
Re: [Tutorial] Introduction to programming using C
Posted: Sat Jul 07, 2012 4:16 am
by Xian Nox
N6v7d8 wrote:I would like to ask if there is a way to compile/run C using Command Prompt like Java?
Sure.
Works well for single-file projects. Also, gcc parameters are the same on Windows and Linux.
Extensions are .c and .h. When saving on notepad, write the name and extension like this:
(Yes, with the ")
Re: [Tutorial] Introduction to programming using C
Posted: Sat Jul 07, 2012 4:35 am
by N6v7d8
Xian Nox wrote:N6v7d8 wrote:I would like to ask if there is a way to compile/run C using Command Prompt like Java?
Sure.
Works well for single-file projects. Also, gcc parameters are the same on Windows and Linux.
Extensions are .c and .h. When saving on notepad, write the name and extension like this:
(Yes, with the ")
Thank you for the reply sir xD
I have another question o,o
where should I put that main.c?
and what should I type in command prompt to run it and test?
Thank you very much xD
I have installed Code::Blocks with MinGW
but as I said I prefer notepad since I'm confuse using CodeBlocks xD
Re: [Tutorial] Introduction to programming using C
Posted: Sat Jul 07, 2012 9:56 am
by Xian Nox
N6v7d8 wrote:where should I put that main.c?
Any place you want. Just navigate to the same folder from the command prompt.
However, I do recommend you reading how to use makefiles once your projects start growing bigger than a single file. Tutorial
here.
N6v7d8 wrote:and what should I type in command prompt to run it and test?
In the example I gave you, random.exe. -o defines the output. If undefined, it will be a.exe on Windows and a.out on Linux.
N6v7d8 wrote:I have installed Code::Blocks with MinGW
but as I said I prefer notepad since I'm confuse using CodeBlocks xD
Fair enough, but I'd recommend you getting some decent editor like Notepad++ or the sorts. Or better yet, getting a Linux distro and using gedit or kate.
Re: [Tutorial] Introduction to programming using C
Posted: Sat Jul 07, 2012 11:12 am
by N6v7d8
Here it is, I create a new folder in C and put the main.c on it
I save as "main" that include " as you said
but when I try to run it on cmd, this thing happen.
Is there something missing?
I'm sorry for many question xD
and thank you for always helping

Re: [Tutorial] Introduction to programming using C
Posted: Sat Jul 07, 2012 11:23 am
by Xian Nox
N6v7d8 wrote:Is there something missing?
gcc. It's not installed or not in the path.
Most likely it's just not in your path, so here's how to add it to your path: Right click on My Computer --> Properties --> Advanced System Settings --> Environmental variables --> double click Path, and append the following:
This is the path to your MinGW install, so if it's on a different path, change accordingly. Also, the Path shouldn't contain any spaces, and the different paths on it are separated by a semicolon.
Also, it's much easier to just select all in your console window, and use the code tag here to paste it. To do so, right click on the command prompt, click select, select what you want, then press Enter to copy it.