Why the line giving the strange error called
1 Answer 1
In the text you have pasted: the – sign is actually the character 0x96, which in the Windows-1252 code page is a sort of hyphen.
You must use the ASCII minus sign instead; try deleting that piece of code and re-typing it.
Make sure you are using a plaintext editor – some word processors will automatically change punctuation to "funky" alternative versions.
I wrote the following code. It is to implement Doubly Linked List. But errors popped up.
Any idea about the stray error. What are those random numbers?
2 Answers 2
I cut pasted some code from a word document. The minus sign was displayed by my text editor, but was actually a value of octal 226 or hex 96. The minus sign should have been a hex 2D. I could see it when I opened my code as a binary file – the octal 226 got displayed in the ascii listing as a block.
Your DoublyLinkedList.c appears to contain text that is not valid C. Those numbers are the octal values of characters that are not valid in a C program.
If you meant to put a descriptive comment at the start of your source file, make sure that each line of your comment begins with // .
Я написал следующий код. Это реализовать двусвязный список. Но ошибки выскакивали.
Любая идея о случайной ошибке. Что это за случайные числа?
Ваш DoublyLinkedList.c кажется, содержит текст, который не является допустимым C. Эти числа являются восьмеричными значениями символов, которые недопустимы в программе на C.
Если вы хотели поместить описательный комментарий в начале вашего исходного файла, убедитесь, что каждая строка вашего комментария начинается с // .
это цикл while с пустым телом (то есть последняя точка с запятой). Если x 1 ваша программа будет зацикливаться бесконечно.