Learn C or C++ here

Talk about any languages right here. Share and discuss source, but don't expect your homework to be done for you.

Learn C or C++ here

Postby NoUse » Tue Apr 19, 2005 7:58 pm

As the forums are growing, I'm seeing more questions about which programming language to learn first. Since I'm an advocate of C and also C++ (just not as much), I'm going to get you started with them here and now. I could go on about the advantages of C and C++ over other languages and why I think you should learn them first, but I’m not going to. If you are really interested in all of the details, you can read it else where (just search Google).

If you are serious about hacking, you will learn a programming language. If you are looking for instant results, I suggest you look else where because there will be no instant hacking here. There are no one click applications that will make you a hacker. To quote a fellow moderator, “Hacking is process, not a product”, and he is absolutely correct. Blah, I’m babbling again, but I think you get the idea. I’m sure you are here to get started with programming anyways, so let’s begin.

The main reason why you see me pushing C around the forums more than C++ is because the main difference between the two is OOP, something you rarely need for hacking. C++ has objects and classes (good ol’ OOP) that are necessary in larger projects but aren’t really necessary at all in our exploit code and small scripts that we will write as hackers. These are some concepts you will learn as you start actually learning the languages. I prefer C, but I will provide links to tutorials for both of these languages and let you decide which one you want to learn. But remember my words, “A good C programmer will be a good C++ programmer, but not the other way around.” *cough* Choose C *cough*

The first thing you want to do is to get yourself a compiler. A compiler is basically what turns your source code into an executable (there’s more to it than that but it’s not necessary for me to discuss that here).

If you are on a Windows platform (which I assume most of you are), you can download a good IDE that comes with the Mingw compiler at:

http://www.bloodshed.net/devcpp.html

It compiles both C and C++ code (most compilers do). It’s extremely easy to use, so I’m sure most of you won’t have any problems with it. If you do, don’t be afraid to post your problems on the forums.

another compiler for Windows:
http://www.digitalmars.com/

If you are on Linux, then you should already know how to compile under gcc. If not, shame on you.


Now on to the good stuff. Here are all of the possible tutorials you would ever need to get started on your journey to learn C or C++.


-----------------------------
Tutorials for both C and C++, I suggest starting here and continuing on:

http://www.cprogramming.com/tutorial.html
-----------------------------


-----------------------------
A series of tutorials written by a friend of mine (lovepump) for C. Programming for Hackers:

http://www.mmdhaven.com/NoUse//tuts/P4HI.pdf

http://www.mmdhaven.com/NoUse/tuts/P4HII.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HIII.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HIV.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HV.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HVI.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HVII.pdf
http://www.mmdhaven.com/NoUse/tuts/P4HVIII.pdf
-----------------------------


-----------------------------
A very good introduction to C++:

http://cplusplus.com/doc/tutorial/
-----------------------------


-----------------------------
Best socket programming guide out there :

http://www.ecst.csuchico.edu/~beej/guid ... intro.html
-----------------------------


-----------------------------
Here is the personal site of Bjarne Stroustrup, the creator of the C++ language. It has a lot of Q & A’s and a lot of background info on the language.

http://www.research.att.com/~bs/homepage.html
-----------------------------


Just to note, the syntax of C and C++ are really similar. Here's an example:

C:
Code: Select all
#include <stdio.h> int main(void) { printf("I'm learning a programming language today!\n"); return 0; }

C++:
Code: Select all
#include <iostream> using namespace std; int main(void) { cout << "C pwns my C++ ass\n"; return 0; }

If you have any questions, feel free to ask.

-NoUse
Last edited by NoUse on Wed Mar 28, 2007 1:20 pm, edited 3 times in total.
And I will strike down upon thee with great vengeance and furious anger
those who would attempt to poison and destroy my brothers.
And you will know my name is the Lord
when I lay my vengeance upon thee.
User avatar
NoUse
time traveller
 
Posts: 2624
Joined: Thu Aug 28, 2003 10:46 pm
Location: /pr0n/fat

Postby B-Con » Wed Apr 20, 2005 12:13 am

Nice tut, good links ;) I've also noticed the influx in questions, this was needed....
- "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started.

- Why know the ordinary when you can understand the extraordinary?
User avatar
B-Con
Challenge Winner [1x]
 
Posts: 2679
Joined: Thu Apr 22, 2004 4:19 pm
Website: http://bradconte.com
Location: UC Davis

Postby begginer » Wed May 04, 2005 11:40 pm

ok im a complete noob to hacking trying to learn i heard that learning c and c++ is this what i should learn
begginer
n00b
 
Posts: 9
Joined: Wed May 04, 2005 8:53 pm

Postby NoUse » Thu May 05, 2005 12:13 am

Did you even read my post?
And I will strike down upon thee with great vengeance and furious anger
those who would attempt to poison and destroy my brothers.
And you will know my name is the Lord
when I lay my vengeance upon thee.
User avatar
NoUse
time traveller
 
Posts: 2624
Joined: Thu Aug 28, 2003 10:46 pm
Location: /pr0n/fat

Postby B-Con » Thu May 05, 2005 1:10 am

c'mon, NoUse, put together a tutorial or something on C/++ programming and help the noob's out.... :lol:
- "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started.

- Why know the ordinary when you can understand the extraordinary?
User avatar
B-Con
Challenge Winner [1x]
 
Posts: 2679
Joined: Thu Apr 22, 2004 4:19 pm
Website: http://bradconte.com
Location: UC Davis

Postby NoUse » Thu May 05, 2005 5:41 am

lmao
And I will strike down upon thee with great vengeance and furious anger
those who would attempt to poison and destroy my brothers.
And you will know my name is the Lord
when I lay my vengeance upon thee.
User avatar
NoUse
time traveller
 
Posts: 2624
Joined: Thu Aug 28, 2003 10:46 pm
Location: /pr0n/fat

Re: Learn C or C++ here

Postby Prism » Thu May 05, 2005 7:06 am

Just thought that I'd mention that C++ is nearly completely backwards compatible with C. The C++ method of the above 'Hello World' program could also be done like this.
Code: Select all
#include <cstdio> int main(void) { std::printf("C++ pwns C! If you aren't bothered by minor differences in performance for basic operations. ;) \n"); return 0; }
User avatar
Prism
Owns you
 
Posts: 1618
Joined: Thu May 06, 2004 9:18 am

Postby Riyonuk » Sat Jun 11, 2005 10:39 am

I downloaded that .pdf document, and read the first chapter and second chapter. Maybe you could test me. I really dont think ill pass though.
Riyonuk
Apprentice
 
Posts: 40
Joined: Wed Jun 08, 2005 7:52 am

Postby B-Con » Sat Jun 11, 2005 3:18 pm

http://www.cprogramming.com/tutorial.html

They have several tutorials with corresponding quizzes. ;)
- "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started.

- Why know the ordinary when you can understand the extraordinary?
User avatar
B-Con
Challenge Winner [1x]
 
Posts: 2679
Joined: Thu Apr 22, 2004 4:19 pm
Website: http://bradconte.com
Location: UC Davis

Postby PB_Nekotcookie » Tue Aug 02, 2005 11:48 pm

just wanted to say, THANK YOU SO FREAKIN' MUCH. this is easily the newb-friendliest forum I have seen. I am very new to this (just started really getting into this stuff a week ago), but since I found this forum I haven't even needed to go to google or ask a question once, what with all the tutorials and links you guys post.
Windows 98: 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand 1 bit of competition.
User avatar
PB_Nekotcookie
n00b
 
Posts: 21
Joined: Tue Aug 02, 2005 8:28 pm

Postby Greeny » Wed Aug 03, 2005 2:36 am

for the last year or so ive been like....hmm i should learn a language..... but too much trouble to find everything.

now i have no excuse thanks heaps :D
noob hacker:

There are 10 kinds of people.... those who can read binary and those who cant!
User avatar
Greeny
n00b
 
Posts: 6
Joined: Mon Aug 01, 2005 7:32 pm

Postby NoUse » Tue Sep 20, 2005 11:22 pm

for the last year or so ive been like....hmm i should learn a language..... but too much trouble to find everything.

now i have no excuse thanks heaps :D
You're velcome.

Say it...velcome...VELCOME ahahahahaha
And I will strike down upon thee with great vengeance and furious anger
those who would attempt to poison and destroy my brothers.
And you will know my name is the Lord
when I lay my vengeance upon thee.
User avatar
NoUse
time traveller
 
Posts: 2624
Joined: Thu Aug 28, 2003 10:46 pm
Location: /pr0n/fat

Postby dice » Tue Oct 04, 2005 5:38 am

This thread had some nice links, but n00bs in need of instructional material can get tutorials up the ying yang through p2p networks. My limewire share folder is full of them.

You won't find Creed mp3s or porn but you will find exciting intructional PDF and Text files . . . . . I know I sound like a dull person, but you gota believe me I was a hell raiser in high school.
dice's mind source [Ver: 130.5099.304]
Copyright (C) 1986 - 2006 Hell Corp.

SOUL:\> DEL BRAIN:\MEMORIES\LAST_NIGHT
User avatar
dice
n00b
 
Posts: 4
Joined: Tue Oct 04, 2005 4:22 am
ICQ: 276055895
Yahoo Messenger: high_roller_44@yahoo.com
AOL: dice5099@aol.com

Postby TheConfusedEgo » Tue Oct 04, 2005 1:14 pm

You won't find Creed mp3s
As a mod, I must take this moment to go horribly off topic like I should tell everyone else not to and state that a lack of Creed MP3s is not a loss ;)
TheConfusedEgo
Otaku
 
Posts: 2629
Joined: Sat Sep 27, 2003 6:25 am

Postby dice » Wed Oct 05, 2005 6:40 am

lol, im more partial to the rock music of the 70's and 80's myself. I was just making a point.
dice's mind source [Ver: 130.5099.304]
Copyright (C) 1986 - 2006 Hell Corp.

SOUL:\> DEL BRAIN:\MEMORIES\LAST_NIGHT
User avatar
dice
n00b
 
Posts: 4
Joined: Tue Oct 04, 2005 4:22 am
ICQ: 276055895
Yahoo Messenger: high_roller_44@yahoo.com
AOL: dice5099@aol.com

Postby pozican » Wed Oct 05, 2005 11:46 pm

You won't find Creed mp3s
As a mod, I must take this moment to go horribly off topic like I should tell everyone else not to and state that a lack of Creed MP3s is not a loss ;)
/me is curious

What lack of audio would be a loss according to the almighty Motz?

Just curious :)

Poz
Get some exercise -- Support bad porn
Life for President, Ramius for vice, GhostHawk for Secretary of Beer
i <3 2 sqrt(u)
User avatar
pozican
Oh lawd is dat sum chikinz
 
Posts: 1617
Joined: Tue May 18, 2004 1:29 pm
Location: #hackerthreads

Postby NoUse » Thu Oct 06, 2005 3:09 pm

You won't find Creed mp3s
As a mod, I must take this moment to go horribly off topic like I should tell everyone else not to and state that a lack of Creed MP3s is not a loss ;)
/me is curious

What lack of audio would be a loss according to the almighty Motz?

Just curious :)

Poz
The Righteous Brother's "Unchained melody". bahahaha :lol:
And I will strike down upon thee with great vengeance and furious anger
those who would attempt to poison and destroy my brothers.
And you will know my name is the Lord
when I lay my vengeance upon thee.
User avatar
NoUse
time traveller
 
Posts: 2624
Joined: Thu Aug 28, 2003 10:46 pm
Location: /pr0n/fat

Postby UniX » Thu Oct 06, 2005 3:34 pm

I thought it would be more like Shania Twain :wink:
"UNIX is an operating system, OS/2 is half an operating system, Windows is a shell, and DOS is a boot partition virus." — Peter H. Coffin .

http://cybergotham.net
User avatar
UniX
Veteran
 
Posts: 600
Joined: Thu Jun 26, 2003 1:17 pm
Location: input("Why are you looking here?")

Postby The Legato » Thu Oct 06, 2005 6:34 pm

You won't find Creed mp3s
As a mod, I must take this moment to go horribly off topic like I should tell everyone else not to and state that a lack of Creed MP3s is not a loss ;)
/me is curious

What lack of audio would be a loss according to the almighty Motz?

Just curious :)

Poz
The Righteous Brother's "Unchained melody". bahahaha :lol:
:shock: That's one of our marching bands halftime song.
http://cma.zdnet.com/book/c++/htm/ch01.htm <- Good C++ starter
http://www.linuxiso.org/ <- Need I say any more?
User avatar
The Legato
Hacker in Training
 
Posts: 96
Joined: Fri Jun 17, 2005 6:03 pm
AOL: Andrew73492
Location: C:/Dev-Cpp

EXE

Postby LiquidIce18 » Sun Oct 23, 2005 1:32 am

after programming, how do you make it into an exe file?
LiquidIce18
n00b
 
Posts: 3
Joined: Fri Oct 21, 2005 11:49 pm


Return to “%s” Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron