Author Topic: Learning C  (Read 18498 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18065
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Learning C
« Reply #25 on: May 29, 2012, 05:44:44 pm »
I eventually managed to install QT, yes very daunting and 7 GB installation. I did promptly uninstalled it. I would probably try one of the others suggested and visual studio not that the download instructions are very clear for it.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: Learning C
« Reply #26 on: May 29, 2012, 05:47:48 pm »
My recommendation to use Visual Studio was not given in jest. Visual Studio is heaps better and more polished than anything else you will find, and what's more it just works. No muss, no fuss. Install it, use it, be happy.
i still have a copy of TurboC, ver3, its "turbo" and no need to install (direct copy) if the OP want. but if you use later than WinXP, than you are out of your luck, its DOS.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18065
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Learning C
« Reply #27 on: May 29, 2012, 05:48:58 pm »
thank you for the offer, however I am looking to move forward and be future proof.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: Learning C
« Reply #28 on: May 29, 2012, 05:58:14 pm »
thank you for the offer, however I am looking to move forward and be future proof.
thats the problem with "young" people. C in the past is C in the future. its... timeless. unless you want to move on to C#. but anyway... cant blame you people. ::)
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12406
  • Country: us
Re: Learning C
« Reply #29 on: May 29, 2012, 05:59:42 pm »
I eventually managed to install QT, yes very daunting and 7 GB installation. I did promptly uninstalled it. I would probably try one of the others suggested and visual studio not that the download instructions are very clear for it.

Can you elaborate?

It seems to me that you just go to this web page http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express and click the "Install Now" button?
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18065
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Learning C
« Reply #30 on: May 29, 2012, 06:01:52 pm »
yes I found a page with a download button for the ISO. Previously I had gone round in circles looking at various versions, there was not much of a hint of downloading it on the other pages.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12406
  • Country: us
Re: Learning C
« Reply #31 on: May 29, 2012, 06:06:07 pm »
I go the ISO route myself, but that is a bit more complicated. The online web installer will check for prerequisites and download only just what you need. It should be faster than the ISO install.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18065
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Learning C
« Reply #32 on: May 29, 2012, 06:15:25 pm »
I'm installing the web version now. they don't make the dam thing easy to find of course because it's free I tried to get you to buy it instead.I'm installing the C++ version there seems to be no C version
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12406
  • Country: us
Re: Learning C
« Reply #33 on: May 29, 2012, 06:18:59 pm »
I'm installing the web version now. they don't make the dam thing easy to find of course because it's free I tried to get you to buy it instead.I'm installing the C++ version there seems to be no C version

It's important to search for Visual Studio "Express". Express is the free version.

Visual C++ 2010 Express is the one you want. It does C as well as C++. To use C, make sure to give your source files a ".c" extension rather than a ".cpp" extension.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12406
  • Country: us
Re: Learning C
« Reply #34 on: May 29, 2012, 06:20:14 pm »
For future reference, here is the jumping off page for Express products:

http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Learning C
« Reply #35 on: May 30, 2012, 12:39:25 am »
Sorry to hear you had issues with QT Creator, Simon.

Visual C++ Express is a fine IDE to learn C.  It sounds like one of the big hurdles for you right now is the IDE.  I know that an IDE can be overwhelming. 

Thankfully, once you learn one IDE you will pretty much know them all.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: Learning C
« Reply #36 on: May 30, 2012, 03:36:21 am »
Thankfully, once you learn one IDE you will pretty much know them all.
dead wrong :P ide is a "language". different ide different vendor... different "language"... ie user interface, where that button, where this button. every ide need to be learnt, but C is still the same (not quite exactly... preprocessors).
« Last Edit: May 30, 2012, 03:40:17 am by Mechatrommer »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Learning C
« Reply #37 on: May 30, 2012, 04:15:05 am »
Thankfully, once you learn one IDE you will pretty much know them all.
dead wrong :P ide is a "language". different ide different vendor... different "language"... ie user interface, where that button, where this button. every ide need to be learnt, but C is still the same (not quite exactly... preprocessors).

Nah.  It's more of a philosophy.  All IDEs have the same philosophy or raison d'être.

Computer languages are separate from IDEs.  Obviously I wasn't saying that "once you learn one language, you know them all."
 

Offline rsjsouza

  • Super Contributor
  • ***
  • Posts: 6071
  • Country: us
  • Eternally curious
    • Vbe - vídeo blog eletrônico
Re: Learning C
« Reply #38 on: May 30, 2012, 12:29:03 pm »
Hi,

Although suggested by several people, I personally always found the K&R book very difficult to start from a beginner's perspective.

When I was trying to learn C (15+ years ago) the way that Herbert Schildt wrote made a lot more sense to me. I used Herbert Schildt's C: The complete reference and the old Borland C's printed manuals. The printed manuals are a thing of the past, but the book can still be found to purchase after all these years.

He has another book that may also be interesting called Teach yourself C, although I never used it - again, his style of writing was what helped me.

Regarding the IDE, my take is that most (if not all) of them have common basic concepts:
 - the arrangement of screens: menu bar at the top, projects on the left, source code in the middle, console output at the bottom;
 - most (if not all) of them work as an interface between the graphical world and a hard, command-line compiler / assembler / linker.
 - the concept of projects: a directory or file that builds an executable (or even a library) and can hold multiple source code files written in multiple languages (assembly, C and C++ are most common for MCUs);
 - also, each project allows to graphically set assembler, compiler and linker options (even with a help or descriptions of each option) and allows to perform a build of the project with a single click;
 - most of them nowadays have a way of debugging the project with a single click as well - however, in my experience that is what changes the most across IDEs.

I've been using IDEs since the glorious Borland's Turbo C and these concepts haven't changed much since them. My personal opinion is that the IDEs of today come with such a set of example code and projects that really helps ramping up on its functionality - note that it is hard to learn C or a device this way, but at least gives a head start to compare why your code does not work and why theirs do... :)
Vbe - vídeo blog eletrônico http://videos.vbeletronico.com

Oh, the "whys" of the datasheets... The information is there not to be an axiomatic truth, but instead each speck of data must be slowly inhaled while carefully performing a deep search inside oneself to find the true metaphysical sense...
 

Offline baljemmett

  • Supporter
  • ****
  • Posts: 665
  • Country: gb
Re: Learning C
« Reply #39 on: May 30, 2012, 02:55:02 pm »
When I was trying to learn C (15+ years ago) the way that Herbert Schildt wrote made a lot more sense to me. I used Herbert Schildt's C: The complete reference

Not wishing to detract from the value you found in his writing, but the name seemed familiar for some reason; a quick Google brought up a critique of the current edition by a (then) voting member of the ISO C committee, as well as a question regarding his texts on StackOverflow.

The latter links to the alt.comp.lang.learn.c-c++ FAQ which be worth a read in itself for pointers to getting-started materials, etc.
 

Offline rsjsouza

  • Super Contributor
  • ***
  • Posts: 6071
  • Country: us
  • Eternally curious
    • Vbe - vídeo blog eletrônico
Re: Learning C
« Reply #40 on: May 30, 2012, 06:28:57 pm »
Not wishing to detract from the value you found in his writing, but the name seemed familiar for some reason; a quick Google brought up a critique of the current edition by a (then) voting member of the ISO C committee, as well as a question regarding his texts on StackOverflow.

The latter links to the alt.comp.lang.learn.c-c++ FAQ which be worth a read in itself for pointers to getting-started materials, etc.

Thanks for the heads-up on the author and the technical accuracy of his books; back in the day there was a large number of garbage books on anything computer-related: several were copy-and-paste of data manuals or articles from Byte magazine... The options for decent books were rare. In any case I ended up getting what I needed (learning C), but I would agree that it may not be the best reference to be recommended anymore.

O'Reilly books usually are made by very decent writers... I learned Perl and have friends that learned several other programming languages from their reference books - unfortunately I never used any of their books about C.
Vbe - vídeo blog eletrônico http://videos.vbeletronico.com

Oh, the "whys" of the datasheets... The information is there not to be an axiomatic truth, but instead each speck of data must be slowly inhaled while carefully performing a deep search inside oneself to find the true metaphysical sense...
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12406
  • Country: us
Re: Learning C
« Reply #41 on: May 30, 2012, 06:45:48 pm »
I have Herb Schildt's C++ book myself. As I was reading it I came to the conclusion it was the worst computer book I had ever seen. It really is an utter train wreck. Please avoid it.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Learning C
« Reply #42 on: May 30, 2012, 06:57:29 pm »
Geez.  I learned C such a long time ago that the books I learned from are all out of print.  All except one that is and that is the classic K&R book.  The fact that it is still in print probably says something.

I already knew assembly language (various processors) and BASIC when I read the K&R book so it wasn't too bad.  I can imagine that a complete noob might have problems, though.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 18065
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Learning C
« Reply #43 on: May 30, 2012, 07:03:24 pm »
yes you're right, I have the K&R book and another book called "programming in C" edition three and I think this later book is easier than the former. They do say in the K&R book that they expect you to have some understanding of programming. I don't make it too complicated but programming in C does seem to start from the ground up talking about the programming language and about how programs are compiled.
 

Offline rsjsouza

  • Super Contributor
  • ***
  • Posts: 6071
  • Country: us
  • Eternally curious
    • Vbe - vídeo blog eletrônico
Re: Learning C
« Reply #44 on: May 30, 2012, 07:31:11 pm »
They do say in the K&R book that they expect you to have some understanding of programming.

I read the K&R book after a few years into C programming; I really appreciated as it clears out some previous misconceptions (maybe caused by Schildt's technical issues), therefore it is a great follow-up book.

The fact that it is still in print probably says something.

Well, several of Schildt's books are still being printed...  :o
Vbe - vídeo blog eletrônico http://videos.vbeletronico.com

Oh, the "whys" of the datasheets... The information is there not to be an axiomatic truth, but instead each speck of data must be slowly inhaled while carefully performing a deep search inside oneself to find the true metaphysical sense...
 

Offline xquercus

  • Contributor
  • Posts: 47
  • Country: us
Re: Learning C
« Reply #45 on: May 30, 2012, 09:57:06 pm »
While these are books which illustrate how to apply C to use with PICs, and don't actually teach C, I suggest:

For C30 on PIC24s (already recommended):
Programming 16-Bit Microcontrollers in C by Di Jasio

and

For C18 on PIC18s:
Applying PIC18 Microcontrollers by Brey
 

Offline SuperMiguel

  • Regular Contributor
  • *
  • Posts: 205
Learning C
« Reply #46 on: June 08, 2012, 10:43:41 am »
There's is also a 32 bit book on that series
 

jucole

  • Guest
Re: Learning C
« Reply #47 on: June 11, 2012, 11:41:19 am »
I'm not an EE and my maths is very poor etc, but I learned a lot from the "C Programming in Easy Steps" book and the dummies guide to C++.
I would suggest beginners to build simple console exe's using the command line and text editor to understand the process; Start with a simple hello world then start using variables and functions, then passing and returning variables, then once you understand "pointers" you're good to go.
Once you get the hang of it, you will dump the text editor and the command line, then you'll want to use a real IDE.

But the most important bit of advice is to stick at it!
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: Learning C
« Reply #48 on: June 11, 2012, 12:19:12 pm »
C++ Nuts & Bolts - Larry Levitsky - McGraw-Hill (1995). not sure if its still around. my little mcu just cannot take pure virtual polymorphic class >:(
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf