Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Learning C through K&R book

Name: Anonymous 2011-08-24 21:12

I already compiled and ran my first code but there's this thing.
When I run it, cmd flashes and disapears.(I'm using Dev-C++ on windows to make it)
Anyways, I think there was a command or function to make the cmd pause till I press enter or something like that so that I am able to read whatever the output was, the thing is, I cant remember the name of the function or how to write it.
Can one of you tell me which it is, if there is one.
BTW here's my code:


#include <stdio.h>

main ()
{
  printf("Hello World!");
}

Name: Anonymous 2011-08-25 5:02

>>23
Hmmm... I had written a long reply to this, in which I argued C isn't a portable assembler, and contemplated the nature of programming languages and paradigms, but decided not to post it. You're only at hello world level (no offense intended; it's the truth), and this board is overflowing with spammers and shit-posters anyway.


C or just go to C++
There's a pretty distinct divide in opinion amongst programmers on this. (The ones who want to fit in will pick C having never used C++ or even given it a thought.) The best you can do is learn a language you have a reason to learn. That way you'll be able to motivate yourself, whether it be C, C++ or some other.
After that you'll have to be genuinely interested.

Javascript is usually a good first language, because it can be used to extend your browser (which you probably spend a large amount of time at).


scanf
It doesn't mix well with line buffered consoles. A catch-22: you need to already know you're at the end of a line in order to get to it without risk of retrieving the next line.


Also, /prog/ is being surprisingly Windows tolerant. What's up with that?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List