C++ code help

NEED HELPP
what's wrong with my code??
it doesnt work >___<
please help me.

#include <stdio.h>
#include <string.h>
int main()
{ int i,j,n;
char a[10][20],t[20];
printf(“Enter the number of strings :”);
scanf(“%d”,&n);
for(i=0;i<n;i++)
scanf(“%s”,a[i]);// read the strings
for(i=0;i<n-1;i++) //bubble sort
for(j=0;j<n-1-i;j++)
if(strcmp(a[j],a[j+1])>0)
{ strcpy(t,a[j]);
strcpy(a[j],a[j+1]);
strcpy(a[j+1],t);
}
printf(“The strings after sorting are : n”);
for(i=0;i<n;i++)
{
printf(“ %s”,a[i]);// print the strings
printf(“n”);
}
}


The error says:

error C2065: '“The' : undeclared identifier
: error C2146: syntax error : missing ')' before identifier 'strings'
error C2059: syntax error : ')'
error C2065: '“' : undeclared identifier
error C2065: 's”' : undeclared identifier
: error C2065: '“n”' : undeclared identifier
Last edited on
Did you copy and paste this from the internet? http://www.scribd.com/doc/86748656/For-Hands-On-Exam-Examples

is not the same as "

is not the same as "
Last edited on
“ and ” should be ".
You're using an accented quote (“), not a standard double ("). The compiler doesn't recognize the accented quote and therefore doesn't recognize what's inside them as a literal.

PLEASE USE CODE TAGS (the <> formatting button) when posting code.
Last edited on
Topic archived. No new replies allowed.