-2

My code is the very simple breadth-first search (BFS) algorithm. But the compiler sent me the:

Error stray '\240'

Why?

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Nurullah
  • 103
  • 3
  • 4
  • 14
  • Not related to the problem, but why do you code C in a .cpp file? .cpp files are for C++. C uses the .c file extension. – Emil Laine Mar 22 '16 at 23:52
  • Don't post images of text! Also C and C++ are different languages which happen to share some similar **syntax**. However, as semantics can differ, never compile C code with a C++ compiler and vice versa! – too honest for this site Mar 23 '16 at 00:02
  • ok i tried .c file but still not working . thahts not main reason. – Nurullah Mar 23 '16 at 00:10
  • 1
    You need to start with a blank file, and type the code by hand. Either that, or write a simple program that reads the file, and replaces the `\240` characters with spaces. – user3386109 Mar 23 '16 at 00:12
  • Paste text in MS word first and while pasting select 'Keep text Only' and then select it from ms word, all the ASCII characters causing errors will be removed and this will solve your problem. – Tushar Gautam May 22 '20 at 11:46

1 Answers1

2

You have probably copied this from somewhere and there are some non-ASCII characters. Open it with some editor where you can see all characters and you will see some strange signs.

The problem is connected to intentions.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
wieczorekm
  • 158
  • 2
  • 9