Dans le code ci-dessous, j'ai une erreur à la ligne:
if( vOperation == "+" )
Le compilateur me dit que je fais une comparaison entre un pointer et un integer. Je ne comprend pas pourquoi. Si il y a une bonne âme pour m'expliquer?
Merci.


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdio.h>
#include <stdbool.h>
 
int main ()
{
	int		vFirstArg,
			vSecondArg;
	char	vOperation;
	bool	vFinished;
 
	vFinished = false;
 
	while( vFinished != true )
	{
		printf( "What operation do you want to do?\n" );
		scanf( "%c", &vOperation );
		fpurge( stdin );
 
		if( vOperation == "+" )
		{
		printf( "Enter left argument: " );
		scanf( "%d", &vFirstArg );
		fpurge( stdin );
 
		printf( "Enter right argument: " );
		scanf( "%d", &vSecondArg );
		fpurge( stdin );
 
		printf( "\n%d + %d = %d\n", vFirstArg, vSecondArg, vFirstArg + vSecondArg );
		}
		else
			vFinished = true;
    }
 
	printf( "Finished.\n" );
 
	return 0;
}