diff --git a/frameserver/defines.h b/frameserver/defines.h index 99b82b7..e7911dc 100644 --- a/frameserver/defines.h +++ b/frameserver/defines.h @@ -37,6 +37,8 @@ struct frame_t unsigned char z; unsigned char windows[HEIGHT][WIDTH][CHANNELS]; unsigned char segments[SEGWIDTH][SEGNUM][SEGCHANNELS]; +// int windows[HEIGHT][WIDTH][CHANNELS]; +// int segments[SEGWIDTH][SEGNUM][SEGCHANNELS]; }; #endif diff --git a/frameserver/glibmm b/frameserver/glibmm new file mode 160000 index 0000000..53596ab --- /dev/null +++ b/frameserver/glibmm @@ -0,0 +1 @@ +Subproject commit 53596ab1de401a084fffaf7cd181dd1663d14630 diff --git a/frameserver/vector.cc b/frameserver/vector.cc new file mode 100644 index 0000000..f725daf --- /dev/null +++ b/frameserver/vector.cc @@ -0,0 +1,25 @@ +// constructing vectors +#include +#include + +int main () +{ + unsigned int i; + + // constructors used in the same order as described above: + std::vector first; // empty vector of ints + std::vector second (4,100); // four ints with value 100 + std::vector third (second.begin(),second.end()); // iterating through second + std::vector fourth (third); // a copy of third + + // the iterator constructor can also be used to construct from arrays: + int myints[] = {16,2,77,29}; + std::vector fifth (myints, myints + sizeof(myints) / sizeof(int) ); + + std::cout << "The contents of fifth are:"; + for (std::vector::iterator it = fifth.begin(); it != fifth.end(); ++it) + std::cout << ' ' << *it; + std::cout << '\n'; + + return 0; +} diff --git a/tutorial/countch b/tutorial/countch new file mode 100755 index 0000000..2b88223 Binary files /dev/null and b/tutorial/countch differ diff --git a/tutorial/countch.cpp b/tutorial/countch.cpp new file mode 100644 index 0000000..6e80f1e --- /dev/null +++ b/tutorial/countch.cpp @@ -0,0 +1,28 @@ +#include +#include +using namespace std; + +int main() { + map freqs; + char ch; + + while (cin .get(ch)) + freqs[ch]++; + + int i; + map::iterator it; + + for (i=1, it = freqs.begin(); it != freqs.end(); ++it,++i) { + switch (it->first) + { + case '\r': cout << "\\r"; break; + case '\t': cout << "\\t"; break; + case '\n': cout << "\\n"; break; + case ' ' : cout << "Space"; break; + default: cout << it->first; + } + + cout << "\t" << it->second << ((i%4) ? "\t" : "\n"); + } + // cout << freqs; +}