Thread: drunken rage
View Single Post
 
Reply
Posted 2008-03-27, 07:30 PM in reply to Adrenachrome's post starting "This thread just simply does not..."
Adrenachrome said:
This thread just simply does not deliver, I demand substance!
weed meth is a subtance

not but really...ok like maybe i can post a C toturial while im drunk

ok likew
wee have variables
and they relalocated opn the stack

int c;
int d'

takes up like 8 bytse of space on 32-bit x85

per function of course you fucking idiot


but if you use malloc() we can alocate liek any amount on the heap
which is RAM you fucking idiot
and its managed by the OS

thats why its inpractcal to write an OS in C++
they are written in C
you fucking retarded motherfucking idiotici cunt

ok

so malloc returns a void*

but you can cast to any type you like, and its automatically aligned for your processor

which means you can adress any type you like (a POINTER though)

liek void* int* long* anything

int* i = malloc(sizeof (int))

but in C++ you need to cast
(that whgy the language sux)

int* i = (int*) malloc(sizeof(int))));

ok

thats your first leson
Old
Profile PM WWW Search
Mantralord seldom sees opportunities until they cease to beMantralord seldom sees opportunities until they cease to beMantralord seldom sees opportunities until they cease to beMantralord seldom sees opportunities until they cease to be
 
 
Mantralord