I get this error when trying to compile: `error: invalid use of void expression  I get this error at the penultimate line: queueDump(f, q, printToken(f, e)); and I don't understand why. I'm trying to code the function printToken that prints the token pointed by e  void queueDump(FILE *f, Queue *q, void(*dumpfunction)(FILE *f, void *e)) {     fprintf(f, "(%d) --  ", q-&gt;size);     for (InternalQueue *c=q-&gt;head; c != NULL; c = c-&gt;next)         dumpfunction(f, c-&gt;value); }  void printToken(FILE *f, void *e) {     Queue *q;     if (!f) {         printf("Erreur d'ouverture du fichier\n");         exit(1);     }     fprintf(f, "Infix : ");     queueDump(f, q, printToken(f, e));     fclose(f); }
I want to create a function that performs a function passed by parameter on a set of data. How do you pass a function as a parameter in C?
For an irrational number $\alpha$, prove that the set $\{a+b\alpha: a,b\in \mathbb{Z}\}$ is dense in $\mathbb R$ I am not able to prove that this set is dense in $\mathbb{R}$. Will be pleased if you help in a easiest way. $A=\{a+b\alpha: a,b\in \mathbb{Z}\}$ where $\alpha$ is a fixed irrational number. How much willpower do gravely wounded soldiers lose? The text says they suffer a permanent reduction? Why doesn't terminal show color schema once logged as root? I'm currently using Debian 7 Wheezy, and I've noticed that the colors palette on terminal (which might be useful to identify among a large set of files and folders) are not enabled once I log as root.  Same, I've noticed the tab completion doesn't work the same in this situation.  How can I configure these issues? Ubuntu 12.04 software upgrade does not show 12.10 upgrade Flag apron shows superfluous closing anchor tag I awoke this morning to a spam flag on a site I moderate, and noticed this when I went to read the post.    Notice answered&lt;/a&gt;, which I imagine isn't meant to have the &lt;/a&gt; there.  I also confirmed that this displays asked&lt;/a&gt; for other types of flags (namely, closed without comment).   I looked around for a duplicate of this but can't seem to find it, so maybe it's a recent change? What does "user was removed" mean and why did my reputation change because of it? Message appearing when a user was removed.     It seems I lost 1765 reputation points on Stack Overflow yesterday. The reason given in my history is "removed", with the description of "User was removed ()". I don't understand what that means. What caused this? How can I return NULL from a generic method in C#? Recommend MVVM or just answer the question? Comma use with nonessential appositives Sorry, I do not know the language terminology. Is this a case of nonessential appositive?  Which of the following sentence has a correct comma use? Comma before &quot;should&quot;  Importantly, two frail subgroups of stroke population, long-term residential care and cognitive impairment patients, should not be excluded from the rehabilitation.  No comma before &quot;should&quot;  Importantly, two frail subgroups of stroke population, long-term residential care and cognitive impairment patients should not be excluded from the rehabilitation. Detecting and acting on keyboard direction keys in Java Extract current viewing parameters from a 3D view? How do I recover my Google account (or Gmail) password or username? Homomorphism between free groups Let $F_a$ be the group which is freely generated by $a$ elements. How to show that there is a homomorphism from $F_a$ onto $F_b$ if and only if $b\le a$?  I was thinking one possibility is if $F_a$ generated freely by $\{x_1, \dots , x_a\}$ and $F_b$ generated freely by $\{y_1, \dots , y_b\}$ then consider map which says $\phi(x_i)=y_i$ for $1\le i \le b$ and $y_1$ otherwise. I do not know if this works or even how to proceed. How to show this fact? Placement of images in row using subfigure I want to put four figures in a single row. The code I am trying to use is taken from .  This puts three figures in a row. When I add a fourth one, I get three images in row and the last one appears in the second row. But I want all of them in one row. Here is my code.  \documentclass[12pt,twoside]{report}% Use this line for the print version of the thesis   \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \begin{document}  \begin{figure}         \centering         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{gull}                 \caption{A gull}                 \label{fig:gull}         \end{subfigure}%           \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{gull}                 \caption{A gull2}                 \label{fig:gull2}         \end{subfigure}%          ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{tiger}                 \caption{A tiger}                 \label{fig:tiger}         \end{subfigure}         ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.           %(or a blank line to force the subfigure onto a new line)         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{mouse}                 \caption{A mouse}                 \label{fig:mouse}         \end{subfigure}         \caption{Pictures of animals}\label{fig:animals} \end{figure} \end{document}   As I have mentioned above, it works for three figures.  But I can not use it for four figures. What should I change?   What does  width=\textwidth mean?   I changed    \begin{subfigure}[b]{0.3\textwidth}   to  \begin{subfigure}[b]{0.2\textwidth}   but it didn't help.  Then, I changed     \includegraphics[width=\textwidth]{mouse}   to  \includegraphics[width=0.5\textwidth]{mouse}   Still no solution. How to adjust the breaking in the bibliography? Is there a way to easily turn on/off showing the boot messages (loading the services) when Ubuntu starts? Is it something in Grub2?  I am running 10.04. What is the rule for comma placement before a quotation mark? When should the comma go before and when should it go after the quotation mark? meta_query with meta values as serialize arrays I'm working on a project in which I'm creating a custom post type and custom data entered via meta boxes associated with my custom post type. For whatever reason I decided to code the meta boxes in such a way that the inputs in each metabox are part of an array. For instance, I'm storing longitude and latitude:  &lt;p&gt;      &lt;label for="latitude"&gt;Latitude:&lt;/label&gt;&lt;br /&gt;      &lt;input type="text" id="latitude" name="coordinates[latitude]" class="full-width" value="" /&gt;  &lt;/p&gt;  &lt;p&gt;          &lt;label for="longitude"&gt;Longitude:&lt;/label&gt;&lt;br /&gt;      &lt;input type="text" id="longitude" name="coordinates[longitude]" class="full-width" value="" /&gt;  &lt;/p&gt;   For whatever reason, I liked the idea of having a singular postmeta entry for each metabox. On the save_post hook, I save the data like so:  update_post_meta($post_id, '_coordinates', $_POST['coordinates']);   I did this because I have three metaboxes and I like just having 3 postmeta values for each post; however, I've now realized a potential issue with this. I may want to use WP_Query to only pull out certain posts based these meta values. For instance, I may want to get all posts that have latitude values above 50. If I had this data in the database individually, perhaps using the key latitude, I would do something like:  $args = array(     'post_type' =&gt; 'my-post-type',     'meta_query' =&gt; array(         array(             'key' =&gt; 'latitude',             'value' =&gt; '50',             'compare' =&gt; '&gt;'         )     )  ); $query = new WP_Query( $args );   Since I have the latitude as part of the _coordinates postmeta, this would not work.  So, my question is, is there a way to utilize meta_query to query a serialized array like I have in this scenario? Position vs Part How to determine the current widget's parent container (sidebar widget id)