Re: Stray \302 error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 31, 2011 at 6:53 AM, Avinash Sonawane
<avinash.sonawane1990@xxxxxxxxx> wrote:
> Respected Sir,
> I am using gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
> I wrote one simple program but after compiling it, its showing me some
> unusual errors .
> Please help.
>
> Program:
>
> # include <stdio.h>
> # include <stdlib.h>
>
>  int main()
>  {
>  int *p;
>  int n,i;
>
>  printf("No. Of Elements = ");
>  scanf("%d",&n);
>
>  p = (int *) malloc(n*sizeof(int));
>
>  for(i=0;i<n;i++)
>  scanf("%d",(p+i));
>
>   for(i=0;i<n;i++)
>  printf("%d\t",*(p+i));
>
>  printf("\n");
>
>  free(p);
>
>  return 0;
>  }
>
> Terminal:
>
> avinash@titanic:/Remastersys/Documents/Programs/c$ gcc dm.c -o dm
> dm.c: In function ‘main’:
> dm.c:17:1: error: stray ‘\302’ in program
> dm.c:17:1: error: stray ‘\240’ in program
You have copy/pasted code from the web. I ran across the same issue
when copy/paste from code.google.com in the past.

You will see the miscreant characters in a hex editor. You will *not*
see them using gedit. And gedit does not properly search/replace - you
will need to use emacs, vi, etc.

Jeff



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux