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

Arrays in C++

Name: Anonymous 2012-11-12 21:48

So lets say I have an array, int array[3] = {123, 456, 789}.
If I wanted to take the first number of each value of the array and store it in another array, say int first[3];, how would I do that? I tried using a pointer to read the first memory address of each value of the array but it keeps returning the full array.

Name: Anonymous 2012-11-13 1:44


(define (first lis)
  (map (compose (curry (flip -) (char->integer #\0))
                char->integer
                (curry (flip string-ref) 0)
                number->string
                abs)
       lis))

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