[ create a new paste ] login | about

Link: http://codepad.org/vuhCHVLa    [ raw code | output | fork ]

xtofl - C++, pasted on Sep 21:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <algorithm>
#include <iostream>


int to_codepoint( char c ) { return (int)c; }

int main(){
   char cs []= "abcd";
   int is[4];

   std::transform( cs, cs+strlen(cs)
                 , std::ostream_iterator<int>( std::cout, ", " ), to_codepoint);

}


Output:
1
97, 98, 99, 100, 


Create a new paste based on this one


Comments: