\hypertarget{eina_inarray_02_8c-example}{\section{eina\+\_\+inarray\+\_\+02.\+c}
}

\begin{DoxyCodeInclude}
\textcolor{comment}{//Compile with:}
\textcolor{comment}{//gcc -g eina\_inarray\_02.c -o eina\_inarray\_02 `pkg-config --cflags --libs eina`}

\textcolor{preprocessor}{#include <\hyperlink{Eina_8h}{Eina.h}>}

\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{int} argc \hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}, \textcolor{keywordtype}{char} **argv EINA\_UNUSED)
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char}* strings[] = \{
      \textcolor{stringliteral}{"helo"}, \textcolor{stringliteral}{"hera"}, \textcolor{stringliteral}{"starbuck"}, \textcolor{stringliteral}{"kat"}, \textcolor{stringliteral}{"boomer"},
      \textcolor{stringliteral}{"hotdog"}, \textcolor{stringliteral}{"longshot"}, \textcolor{stringliteral}{"jammer"}, \textcolor{stringliteral}{"crashdown"}, \textcolor{stringliteral}{"hardball"},
      \textcolor{stringliteral}{"duck"}, \textcolor{stringliteral}{"racetrack"}, \textcolor{stringliteral}{"apolo"}, \textcolor{stringliteral}{"husker"}, \textcolor{stringliteral}{"freaker"},
      \textcolor{stringliteral}{"skulls"}, \textcolor{stringliteral}{"bulldog"}, \textcolor{stringliteral}{"flat top"}, \textcolor{stringliteral}{"hammerhead"}, \textcolor{stringliteral}{"gonzo"}
   \};
   \textcolor{keywordtype}{char} **str, **str2;
   \hyperlink{struct__Eina__Inarray}{Eina\_Inarray} *iarr;
   \textcolor{keywordtype}{int} i;

   \hyperlink{group__Eina__Main__Group_gabf448ada5bc81a07342b66c6f818ee5e}{eina\_init}();
   iarr = \hyperlink{group__Eina__Inline__Array__Group_ga38a116a1355055b470c31bb4f633e53b}{eina\_inarray\_new}(\textcolor{keyword}{sizeof}(\textcolor{keywordtype}{char} *), 0);

   \textcolor{keywordflow}{for} (i = 0; i < 20; i++)\{
     str = (\textcolor{keywordtype}{char} **)(&strings[i]);
      \hyperlink{group__Eina__Inline__Array__Group_ga6b9a97816b98ccf9be6b65ca06b90013}{eina\_inarray\_push}(iarr, str);
   \}

   printf(\textcolor{stringliteral}{"Inline array of strings:\(\backslash\)n"});
   \hyperlink{group__Eina__Inline__Array__Group_gab6ffcad27b5099aa34af9ecd5e2b22f9}{EINA\_INARRAY\_FOREACH}(iarr, str2)
     printf(\textcolor{stringliteral}{"string: %s(pointer: %p)\(\backslash\)n"}, *str2, str2);

   \hyperlink{group__Eina__Inline__Array__Group_ga369b3090b7c04377eaceb6bebfe36e06}{eina\_inarray\_free}(iarr);
   \hyperlink{group__Eina__Main__Group_ga6741fcaba116e31e96ce14dcfa03f568}{eina\_shutdown}();
\}
\end{DoxyCodeInclude}
 