user4358: I have a header file, where I try to collect global variable declarations. When trying to typedef a map I get the following error:
n file included from Dis0_10.ino:7:
/var/folders/jl/nv1qvh6n569cxq9xxfd6dx980000gn/T/build8295701509021940161.tmp/globals.h:23: error: expected initializer before '<' token

relevant code snippets from global.h are:
#ifndef GLOBALS
#define GLOBALS
#include <map>

...
typedef std::map<uint8_t,uint8_t> memmap_t;

I have no clue, why this statement should fail. I consider it rather straight forward. So I think there must be some problems of this kind here. Or am I missing another include?

user1585: The C++ standard library is not available for arduino. 
Some implementations of similar containers or certain functions exist on the web, but for the most part the standard library is impractical on a device with such small amounts of both RAM and program memory.
An implementation of SGI STL for AVR has been documented here: http://andybrown.me.uk/wk/2011/01/15/the-standard-template-library-stl-for-avr-with-c-streams/
map is mentioned as being particularly impractical for anything less than an arduino mega(1280). An example of maps working is included on the page so it seems like a good lead if you really must use one, but I've never done this myself so I cant guarantee it still works.

4358: <p>I have a header file, where I try to collect global variable declarations. When trying to typedef a map I get the following error:</p>

<pre><code>n file included from Dis0_10.ino:7:
/var/folders/jl/nv1qvh6n569cxq9xxfd6dx980000gn/T/build8295701509021940161.tmp/globals.h:23: error: expected initializer before '&lt;' token
</code></pre>

<p>relevant code snippets from global.h are:</p>

<pre><code>#ifndef GLOBALS
#define GLOBALS
#include &lt;map&gt;
</code></pre>

<p>...</p>

<pre><code>typedef std::map&lt;uint8_t,uint8_t&gt; memmap_t;
</code></pre>

<p>I have no clue, why this statement should fail. I consider it rather straight forward. So I think there must be some problems of <a href="https://stackoverflow.com/questions/6558697/c-map-expected-initializer-before-token">this kind here</a>. Or am I missing another include?</p>
 1585: <p>The C++ standard library is not available for arduino. </p>

<p>Some implementations of similar containers or certain functions exist on the web, but for the most part the standard library is impractical on a device with such small amounts of both RAM and program memory.</p>

<p>An implementation of SGI STL for AVR has been documented here: <a href="http://andybrown.me.uk/wk/2011/01/15/the-standard-template-library-stl-for-avr-with-c-streams/" rel="nofollow">http://andybrown.me.uk/wk/2011/01/15/the-standard-template-library-stl-for-avr-with-c-streams/</a></p>

<p>map is mentioned as being particularly impractical for anything less than an arduino mega(1280). An example of maps working is included on the page so it seems like a good lead if you really must use one, but I've never done this myself so I cant guarantee it still works.</p>
