🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

02.01 - The C Language

Started by
21 comments, last by Teej 20 years, 3 months ago
quote:
Every tutorial begins with the classical "Hello World" program, that I think you all are familiar with. A program that writes Hello World on the screen. But hey... Why on earth would anyone want to do that? My point is: Why does all tutorials (at least the ones I found) teach you how to do things in DOS? I don´t want to do ANYTHING in DOS! I my opinion, DOS is dead... (Hope I don´t offend anyone...) I just love Windows, whith all those nice OK and Cancel buttons... I want to write my programs in that platform.

I hope you can help me out here. Is there any reason for me att all to continue learning from this book and those tutorials? None of them covers anything about Windows. Sure, I have to learn to crawl before I start to walk, but am I crawling the right direction??? I just don´t want to waste my time... Perhaps I am a little impatient, but hey: That´s just how i am :-)


I can understand why you are impatient! BUT... stick with learning C or C++ before trying to do anything significant with Windows. If you don''t master C or C++ first, you will just be setting yourself up for discouragement and failure.
By the way, C is a programming language and Windows is an operating system (although I agree that there is a little more to it than that). Although you may think that you are programming in DOS, you could be doing almost the exact same thing in UNIX or some other OS.

C (or C++) is an essential foundation for everything that you do in Windows. Believe me (and I speak from many years of experience) you will never regret getting a good foundation in C before tackling Windows code.
Advertisement
Thanx Weatherman!
That´s excatly what I needed! I follow the books and the tutorials, and I think this C stuff is really cool! Now that I know that I eventually will learn more, and that this knowledge will be of great help when I start to learn C in Windows, it feels better to start from the beginning. I will get there someday... I just needed to know that this knowledge is of importance when all of the samples I have seen from Windows programs seem so different from the ones in the book.

But there seems to be so much to learn... All tutorials and books are focusing on different topics. How will I know when I have learned enough to take the step over to the "Windows stuff"?
Will this book I mentioned before be enough or should I practise more? My problem is that I have serious difficulties to see what all keyword, functions, pointers and so on applies to in "the real world" I still feel that the practises and examples are stuff that I probably never will have use of in my own programs. But probably I´m wrong... Thanks again!

Anakha
Hello World is the first program that you make only for tradition. It could also print "My first program" but thats not tradition is it? Also when or if you learned for loops yet the reason why most books or some choose i, j, and k.(j and k if i is taken) is because of tradition too. I think Fortran could only use those variables to count so programmers still continued ot use those variables in C/C++(though you can use any variable names)

About programming in Windows. Programming in Windows requires that you know the Win32 API(Application Programming Interface) which requires that you know how to do things in C or C++ already. You must know how to do things in C before you move on and use things(APIs) that change what GUI(Graphical User Interface - like Windows Explorer or a DOS Prompt) you are programing in.

Also if you start learning Windows programming you will be skipping neccessary skills needed to make useful applications in Windows, you wont always know why something happens, and you will be overwhelmed(maybe). Depending on your pace of learning C(and practice!!! - MAKE programs too!) you could start learning the Win32 API in a month or so.

"Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.
"Ogun's Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.
"I think Fortran could only use those variables to count so programmers still continued ot use those variables in C/C++(though you can use any variable names)"

Actually, I believe that it''s because variables that start with certain letters are by default integer. This way, you didn''t have to bother with declaring them. That''s why you would see ppl use kandy instead of candy for an integer name, etc.

This sentence is false.
This sentence is false.
You are correct. In FORTRAN (at least, the versions current in the ''60s and ''70s), variables that began with i, j, k, l, m, and n were integer variables by default. All other variables were floating point. This could be overridden (if I recall).
can visual c++ do some c

Whoa!Ebony!


Edited by - Access on March 7, 2002 12:28:59 PM
______________________________Yes I think the rev pad sucks/so does 50 and the DS. I like action and am not ashamed. I prefer brunettes but hate chocolate. Yes,I have opinions!!! Rate as you will.
Anonymous Poster, any C++ compiler, including Visual C++, will accept C code. As C is the basis for C++.
Anonymous Poster, any C++ compiler, including Visual C++, will accept C code. As C is the basis for C++.
quote: Original post by Anakha
I hope you can help me out here. Is there any reason for me att all to continue learning from this book and those tutorials? None of them covers anything about Windows. Sure, I have to learn to crawl before I start to walk, but am I crawling the right direction??? I just don´t want to waste my time... Perhaps I am a little impatient, but hey: That´s just how i am :-)

And secondly, if there isn´t, what do you guys think that I should try with, so I can learn C language in the Windows environment instead of the boring DOS?


Well, the answer is simple: You need to crawl before walking. The ''Hello World'' program is the most direct and simple way to begin using the language. When you design a game, you have to be sure that most of the logic works before starting to work seriously on the Interface. Right now, I´m doing an Uno card game for Java, and for now it´s almost completely done in the console (or DOS), and I´ve been doing both parts: Nice graphics and logic, but if the game doesn´t work right without graphics, all your work will be worth crap.

Just my two cents...
Ciro Durán :: My site :: gamedev.net :: AGS Forums

This topic is closed to new replies.

Advertisement