Guys,
I wrote these following statements in my program but the output is not as i expect.The compiler DID NOT ask any input for the * line.Why?
char a,d;
while (d!='n')
{
printf("B for Bus\n");
printf("C for Car\n");
printf("Vehicle type:");
scanf("%c",&a);
printf("ni ha:%c\n",a);
printf("Any more vehicle? [y/n]:");
*scanf("%c",d);
printf("po:%c",d);
may I suggest you to use cin and cout from the iostream library instead of scanf() and printf()? It's less confusing, imho, and sure more "C++ style" ^^'