--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
hi,
i have a c program in notepad. How to convert it or how to compile
it?
Convert it to what?
First save your program to a file. Then invoke your system's C compiler
and pass this file as it's source file. Your compiler and it's support
programs must be in your executable search path.
>>hi,
>> i have a c program in notepad. How to convert it or how to
>> compile
>>it?
>>
>"This is the big hurdle", as Brian Kernighan rightly said. Everything
>else in C is relatively simple by comparison.
>
<snip>
>
I personally found this to be the smallest hurdle in learning C.
Yes, but like that rubbish about debugging being twice as hard as
writing it right in the first place, if it comes from the mouth of a
"great" it must be true according to some.
Compiling a simple program is, of course, easy to anyone capable of
reading. Understanding C and designing programs to utilise its core
strengths is not.
>>hi,
>> i have a c program in notepad. How to convert it or how to
>> compile
>>it?
>>
>"This is the big hurdle", as Brian Kernighan rightly said. Everything
>else in C is relatively simple by comparison.
>
<snip>
>
I personally found this to be the smallest hurdle in learning C.
It has rightly been said that the distance between 0 and 1 is greater than
the distance between 1 and 1000. (Your mileage may vary. Mathematicians
need not apply. May contain nuts.)
When I first learned C, I did so by taking a 13-week course. We were given
quite a few days of classroom stuff before we were let loose on a
computer. Our first task was "hello, world". We didn't have to install the
compiler - that had already been done for us, thank heaven.
One of the people in the class (a very promising student, it seemed to the
rest of us) got quite a few (I think it was 13) compilation errors. He got
up and walked out of the lab, and we never saw him again.
We all know that he's probably made just one mistake, or possibly two -
maybe a missing semicolon, maybe a 0 instead of a ), or whatever. Had he
fought his way over that hurdle, I'm sure he would have made a perfectly
good C programmer. But it was too big a *perceived* hurdle for him.
I stand by my original statement. Compared to the challenge of getting
"hello world" up and running, *especially* if nobody has been kind enough
to install a compiler for you, the rest of C is relatively simple.
--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
abi said:
>
>hi,
> i have a c program in notepad. How to convert it or how to
> compile
>it?
>
"This is the big hurdle", as Brian Kernighan rightly said. Everything
else in C is relatively simple by comparison.
<snip>
I personally found this to be the smallest hurdle in learning C.
<snip>
I stand by my original statement. Compared to the challenge of getting
"hello world" up and running, *especially* if nobody has been kind enough
to install a compiler for you, the rest of C is relatively simple.
In practically every C course I can think of, a ready to use compiler
and environment were provided. If someone is going to learn C at home,
then he ought to familiarize himself with the basic usage of
computers, (manipulating files, installing programs etc.), before
attempting to learn C.
In summary what you say would be true only in two cases, (I can think
of):
1. Attempting to learn C before learning the basics of using
computers.
2. Attempting to write your first program before getting the basics of
C syntax down pat.
>"This is the big hurdle", as Brian Kernighan rightly said. Everything
>else in C is relatively simple by comparison.
[...]
I stand by my original statement. Compared to the challenge of getting
"hello world" up and running, *especially* if nobody has been kind enough
to install a compiler for you, the rest of C is relatively simple.
>
In practically every C course I can think of, a ready to use compiler
and environment were provided. If someone is going to learn C at home,
then he ought to familiarize himself with the basic usage of
computers, (manipulating files, installing programs etc.), before
attempting to learn C.
>
In summary what you say would be true only in two cases, (I can think
of):
>
1. Attempting to learn C before learning the basics of using
computers.
Considering how many people try to use computers before learning the
basics of using computers, I think the field is pretty wide open for
this one.
2. Attempting to write your first program before getting the basics of
C syntax down pat.
As I recall, I created/compiled/ran "Hello world" before I knew much
about C beyond the first few pages of K&R.
Yes, I was quite familiar with programming in general, having already
been self-taught in numerous languages. Yes, I knew how to use the
computer, and was able to install the C compiler, and use a text
editor.
Even so, there was a certain little thrill the first time the compile
worked and the "Hello world" message appeared on my screen when I ran
the program.
Nowadays, when people are spoon-fed pre-installed IDEs which can make
a complete "project" for you at the click of a button or two, I can't
see someone getting that same thrill.
>"This is the big hurdle", as Brian Kernighan rightly said.
>Everything else in C is relatively simple by comparison.
[...]
I stand by my original statement. Compared to the challenge of
getting "hello world" up and running, *especially* if nobody has
been kind enough to install a compiler for you, the rest of C is
relatively simple.
>In summary what you say would be true only in two cases, (I can think
>of):
>>
>1. Attempting to learn C before learning the basics of using
>computers.
>
Considering how many people try to use computers before learning the
basics of using computers, I think the field is pretty wide open for
this one.
>
>2. Attempting to write your first program before getting the basics
>of C syntax down pat.
>
As I recall, I created/compiled/ran "Hello world" before I knew much
about C beyond the first few pages of K&R.
>
Yes, I was quite familiar with programming in general, having already
been self-taught in numerous languages. Yes, I knew how to use the
computer, and was able to install the C compiler, and use a text
editor.
In my estimation the difficulty of entering, saving, compiling and
running a "hello world" program has nothing to do with C and all to do
with the details of operating the system.
In which case, if for someone, this was their greatest challenge in
learning C, I can only conclude that they attempted to learn C before
becoming adequately familiar with their system.
I personally started programming about a year after I started on
computers, so this wasn't a problem to me. Also modern computing
environments are significantly more intuitive and easier to operate
than in the days of K&R.
Still this type of difficulty typically arises when someone starts on
programming without being familiar with more basic operations like
editing files, using the commandline and so on.
>>abi said:
>>>
>>>hi,
>>> i have a c program in notepad. How to convert it or how to
>>> compile
>>>it?
>>>
>>"This is the big hurdle", as Brian Kernighan rightly said. Everything
>>else in C is relatively simple by comparison.
>>
><snip>
>>
>I personally found this to be the smallest hurdle in learning C.
>
It has rightly been said that the distance between 0 and 1 is greater than
the distance between 1 and 1000. (Your mileage may vary. Mathematicians
need not apply. May contain nuts.)
>
When I first learned C, I did so by taking a 13-week course. We were given
quite a few days of classroom stuff before we were let loose on a
computer. Our first task was "hello, world". We didn't have to install the
compiler - that had already been done for us, thank heaven.
>
One of the people in the class (a very promising student, it seemed to the
rest of us) got quite a few (I think it was 13) compilation errors. He got
up and walked out of the lab, and we never saw him again.
>
We all know that he's probably made just one mistake, or possibly two -
maybe a missing semicolon, maybe a 0 instead of a ), or whatever. Had he
fought his way over that hurdle, I'm sure he would have made a perfectly
good C programmer. But it was too big a *perceived* hurdle for him.
>
I stand by my original statement. Compared to the challenge of getting
"hello world" up and running, *especially* if nobody has been kind enough
to install a compiler for you, the rest of C is relatively simple.
>
I never have found string handling to be simple in any sense in C.
Perhaps it's just a personal flaw or blind-spot, but having to
explicitly do the memory management makes it inherently not simple for me.
I never have found string handling to be simple in any sense in C.
Perhaps it's just a personal flaw or blind-spot, but having to
explicitly do the memory management makes it inherently not simple for me.
<OT>
You haven't programmed on Symbian, have you? Their string handling makes
C strings look not only simple, but also beautiful.
</OT>
Comment