General > Chit-Chat

New Pelles and C Learner

(1/2) > >>

shazam:
Hello All  :D

Introducing myself

I bought C for dummies and found Pelles C by googling (I like that Pelles is C99)

I'm new to programming and have always wanted to learn C

OK.....off to chapter 1  ;D 

CommonTater:
Welcome aboard...

C for Dummies isn't the best start you can have, but it's better than no start.  Just go through, do the exercises and play with the code a bit then move on to the next section... You'll do fine.

Also, make good use of the Pelles C helpfile... This is probably the best documented implementation of C-99 I've ever seen.  The help file is extremely well done.  (Thank you Pelle!)

shazam:
Thanks for the feedback CT  :)

I bought the Dummies book because I was hoping...well....the author would teach me as a dummy  ;D

But I see he is using gets() and puts() alot...and from what I have googled .....those are frowned upon?

Maybe I'm so new that I shouldnt worry about it right now?

Hey at least I got "Hello World!" to finally work in a console app  ;D

CommonTater:
Hello World is the standard first program for C programmers.  Even the advanced ones will write it as a quick way to test a new compiler setup.  So now that you've got that under your belt, it's on to the next section.

Yes, C4D does use gets() and puts() rather a lot.  It's not a problem really.  The frowning is because gets() is prone to overruns... fgets(dst,size,stdin) is a good replacement for gets(dst) as it has a length spec for the string.  printf() is generally considered the better replacement for puts() because puts() includes a newline sequence that is not always desirable... although I use puts a lot when troubleshooting with few or no problems.  (Look these up in the Pelles C help file for more info)

My suggestion would be to cultivate good habits as early as possible.  It's much easier than unlearning bad habits later.  So as you identify these things, you should adopt them... think of yourself as editing the book :D

Of course there is considerable expertise here to help you along.  In fact half these guys make me look like a beginner.

nandagopalrl:
I am new to C and pelles - C, i am using windows 7 and virtual box buggs me so i installed pelles - c, i have been working only with borland C & CPP compiler,so i find it very hard to start with Pelles - C so some help please..

my problem for example - i tried to execute " HELLO WORLD" program to check how pelles - C works, but it wont accept clrscr, getch and SCANF!! void main is ot allowed, it is int main(viod)... i am a borland guy so please help me starting with pelles - C

Navigation

[0] Message Index

[#] Next page

Go to full version