Back to Computers & Modding

The RomU C Tutorial.

fgghjjkllOP
#1
ok guys.
umm....so some of you want to code for the PC or DS or some other crap, and i think C is kinda suitable for it.
C is kinda like a half/half language. not easy but not hard either.
so...yeah. anyways. i know im lazy so i might not post everyday. but i WILL post. or some one will anyway. XD
anyways.lets start with the history of C?ill make it very short.
First there was B language. then there was C. then there was C++and...yeah....ill post later
fgghjjkllOP
#2
ok guys.
umm...
anyways.
when you code in C. there is going to be some steps.
1.think up an idea
2.use notepad [or something similar]
3compile and link
4.test.
5.debuganyways.
lets code a simple thing. but before i do that.
C is like give and get.
you enter some thing, it spits something back.
this thing is called I/O [or something}
which ill tell you later in the thread.#include <stdio.h>int main()
{
printf("This is an example!\n");
return(0);
}
#include is known as a preprocessor directive. tells the compiler to include stuff from another file obviously. stdio.h stands for standard input output. this is required by most programs. without it your dead.
int identifys main as a interger function.
printf prints stuff on the screen. \n makes new line.
return(0) clears the memory that this app used. kinda..i think....anyways. yeah
thats you first real lesson.
did i miss anything?
bhatooth
#3
wait what can i do with C?
anandjones
#4
http://en.wikipedia.org/wiki/C_(programming_language) Usually Medium-High level ranged language. I do not see the point in this. There are many in-depth tutorials on the web written by actual programmers :P
Loonylion
#5
bhatooth · #3wait what can i do with C?
Windows is most likely written in C. Most big programs are.
Lechongbaboy
#6
May I ask what's the difference beetwen C, Turbo C, C++, C sharp? I once got into College as an IT student and am baffled by it.
Loonylion
#7

Replying to #6

C is a language, turbo C is an IDE (integrated development environment) for the C language, C++ is a language derived from C and C sharp is an entirely different languagethis tutorial misses so much important stuff its really not a good idea to follow it.
fgghjjkllOP
#8
ok...umm....youll be learning bout puts.so...itll be like this....#include <stdio.h>int main()
{puts("Example....lol");
return(0);
}basically you pronounce it as put string,
when using puts, remember that its almost like
printf("Example...lol\n");so if you dont want a new line, use printf.[if someone thinks that this is a waste of time, ill ask a mod to lock it up.
the reason im teachin you guys is cos you dont have to spend months at uni studying C and also it saves you time from googling a tutorial, cos it RIGHT IN FRONT OF YOU!]
marcy
#9
How about structuring your programs a littlelike this ->#include <stdio.h> int main ()
{
printf ("Hello World!\n");
return 0;
}Or/And you could use the code-tag to seperate the source code from your explanations :) ->

#include <stdio.h>

  int main ()
  {
    printf ("Hello World!\n");
    return 0;
  }
I personally like the idea of this thread. :)
Loonylion
#10
fgghjjkll · #8the reason im teachin you guys is cos you dont have to spend months at uni studying C and also it saves you time from googling a tutorial, cos it RIGHT IN FRONT OF YOU!]
They'll waste more time trying to learn from this than they would googling a proper tutorial. You are not explaining anything, and you are missing out a lot of important stuff regarding program structure and good practise. At this point, I could write a better tutorial and I barely know any C
jevejo777
#11

Replying to #10

you're totally right, but it could be useful if this is for asking something about c you don't get so someone can explain it.
Seph
#12
Asking yes, tutorial no.Besides C is a pain, go with C++. :P
fgghjjkllOP
#13
oh well....meh...
anyway...im gonna type more up later...too lazy right now XD
marcy
#14
Seph · #12Besides C is a pain, go with C++. :P
The lord has spoken :D
1prinnydood
#15
You guys are all nuts, all the best programers use LOLCODE, feast your eyes on the glory :PHAI
CAN HAS STDIO?
I HAS A VAR
GIMMEH VAR
IZ VAR BIGGER THAN 10?
YARLY
BTW this is true
VISIBLE "BIG NUMBER!"
NOWAI
BTW this is false
VISIBLE "LITTLE NUMBER!"
KTHX
KTHXBYEFor more sillyness http://lolcode.com/ (sorry for being off topic, I could not resist) :D
Loonylion
#16

Replying to #15

Thats bollocks, REAL programmers use brainfuck.

++++++++++        initializes cell zero to 10
[
   >+++++++>++++++++++>+++>+<<<<-
]                 this loop sets the next four cells to 70/100/30/10 
>++.              print   'H'
>+.               print   'e'
+++++++.                  'l'
.                         'l'
+++.                      'o'
>++.                      space
<<+++++++++++++++.        'W'
>.                        'o'
+++.                      'r'
------.                   'l'
--------.                 'd'
>+.                       '!'
>.                        newline
1prinnydood
#17

Replying to #16

Loonylion, all lies, the best real programmers use Piet.Prime Number Generator
http://www.dangermouse.net/esoteric/piet.html(I promise no more off topic spam)
nomercy
#18
Don't start with C++ if you don't know C. C++ is an extension to C, so it makes sense to first learn C and then C++. You'll hate programming if you start with C++.C is low-level, when you want to do things fast and efficient. If C is still too slow, then you'll end up with assembly, which is not portable.C# is .Net based and is more like Java than C (although it feels so much faster than Java).If you spend months learning C at uni, then you have a strange university. C is a tool, not a goal. I had three lectures in C, of which two were explaining the whole pointer thing (including how memory works).Don't bother with a tutorial, you'll miss out on the basics.
CloudBoii12
#19
...
this
is going nowhere? LOL
anandjones
#20
nomercy not necessarily. You will get stuck on C for a while if you learn that first and then switch to C++, the reason being similar to the "bad habits are hard to break" deal. You'll get used to using different aspects in one language, which then would usually result in errors on the other source when it comes to it (.c,.cpp etc.). I wouldn't call it an 'extension' either. And yes, C++ would be worse in terms of speed and size (binary execution, compiling etc.). Also, C++ has OOP :P And classes.Brainfuck is the shit :P
Showing posts 1–20 of 25 · This discussion is archivedBack to top