crypticdragon ([info]crypticdragon) wrote,
@ 2005-08-13 17:08:00
Previous Entry  Add to memories!  Share this!  Next Entry
Current mood: uncomfortable

Help!
Right, so as much as I really hate admitting Im so lost, the programs due on Monday, and the Final is on Wedsnesday.

So if anyone loves me enough to help me understand the gcc compile errors, parameter passing, or go over pointers, pointer casting & their arthimetic with me
I will
a) love you forever
b) feed you
c) nothing really here, but the list needs at least three items




(3 comments) - (Post a new comment)


[info]jgrafton
2005-08-13 02:31 pm UTC (link)
what errors are you getting?

(Reply to this)


[info]mirilah
2005-08-13 03:57 pm UTC (link)
well, seeing as how you already love me forever (damn narcisist! :p), and we're going to be living together and therefore most likely eating together more often than not, no. Also, there's that part where you don't actually want my help on this kind of thing :)

(Reply to this)


[info]aij
2005-08-13 04:03 pm UTC (link)
Are you in Pgh?

==jgrafton

Parameter passing is done by pushing the parameters on the stack, in the reverse order of what you are passing them, then calling the function.

Pointers hold a memory address. Casting them doesn't really do anything, except tell the compiler to do arithmetic on it differently. Casts to or from void* are implicit.

If p is a pointer, and i is an iteger, p+i adds i*sizeof(*p) to the pointer, so it is the same as &p[i].

(Reply to this)


(3 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Log in with OpenID
English • Español • Deutsch • Русский…