When writing a program, sometimes the compiler requires the program to be an English input, but you often switch to Chinese or directly copy the source code on the network, so it appears
Et_ip.c: 28: 1: Error: The program has a free '\ 100'
Get_ip.c: 28: 1: Error: The program has a free '\ 100'
Get_ip.c: 28: 1: Error: The program has a free '\ 100'
Get_ip.c: 28: 1: Error: The program has a free '\ 100'
Get_ip.c: 32: 1: Error: The program has a free '\ 302'
Get_ip.c: 32: 1: Error: The program has a free '\ 240'
Get_ip.c: 36: 1: Error: The program has a free '\ 100'
Get_ip.c: 36: 1: Error: The program has a free '\ 100'
This is generally the use of "", "", and other symbols, sometimes even spaces.
How can this problem be solved?
It is easy to correct them one by one, but many cannot be found easily. What should I do?
You can add redirection using the OD command in Linux,
Od details:
Linux Command: OD
Example: OD-C hello
Linux Command: OD
Od command
Users usually use the OD command to view the content of files in special formats. You can specify different options for this command to display files in decimal, octal, hexadecimal, and ASCII code.
Syntax: OD [Option] file...
Meaning of each option in the command:
-A specifies the address base, including:
D decimal
O octal (default)
X hexadecimal
N do not print the displacement value
-T specifies the data display format. The main parameters include:
C ASCII character or backslash Sequence
D. Signed decimal number
F floating point number
O octal (the default value is 02)
U unsigned decimal number
X hexadecimal number
Other options except option C can be followed by a decimal number N, specifying the number of bytes contained in each display value.
Note: The default display mode of the OD command system is octal, which is also the origin of the command name (octal
Dump ). However, this is not the most useful display method. The combination of ASCII code and hexadecimal code can provide more valuable information output.
For example:
1. qust @ qust-K42JZ :~ /Test $ GCC get_ip.c-O get_ip
Get_ip.c: In the 'main' function:
Get_ip.c: 32: 1: Error: The program has a free '\ 302'
Get_ip.c: 32: 1: Error: The program has a free '\ 240'
Get_ip.c: 36: 1: Error: The program has a free '\ 100'
Get_ip.c: 36: 1: Error: The program has a free '\ 100'
2. In the terminal, we use the OD-C get_ip.c> log.txt command to output the content of get_ip.c to log.txt as an ASCII character or backslash.
3.20.log.txt content
0000000 # i n c l u d e < s t d l i b0000020 . h > \n # i n c l u d e < s t0000040 r i n g . h > \n # i n c l u d e0000060 < s y s / s o c k e t . h > \n0000100 # i n c l u d e < s y s / i o0000120 c t l . h > \n # i n c l u d e 0000140 < n e t / i f . h > \n # i n c l0000160 u d e < s t d i o . h > \n # i0000200 n c l u d e < n e t i n e t /0000220 i n . h > \n # i n c l u d e <0000240 a r p a / i n e t . h > \n \n i n0000260 t 302 240 m a i n ( ) \n { \n i n t 3020000300 240 i = 0 ; \n i n t 302 240 s o c k f0000320 d ; \n s t r u c t 302 240 i f c o n0000340 f i f c o n f ; \n u n s i g n0000360 e d 302 240 c h a r 302 240 b u f [ 5 10000400 2 ] ; \n s t r u c t 302 240 i f r e0000420 q * i f r e q ; \n / / 345 210 235 3450000440 247 213 345 214 226 i f c o n f \n i f c o0000460 n f . i f c _ l e n = 5 1 2 ;0000500 \n i f c o n f . i f c _ b u f 0000520 = b u f ; \n i f 302 240 ( ( s o c0000540 k f d = s o c k e t ( A F _0000560 I N E T , S O C K _ D G R A M ,0000600 0 ) ) < 0 ) \n { \n p e r r o r (0000620 " s o c k e t " ) ; \n e x i t (0000640 1 ) ; \n } \n i o c t l ( s o c k0000660 f d , S I O C G I F C O N F , &0000700 i f c o n f ) ; 302 240 / / 350 216 267 3450000720 217 226 346 211 200 346 234 211 346 216 245 345 217 243 344 2770000740 241 346 201 257 \n / / 346 216 245 344 270 213 346 235 2450000760 344 270 200 344 270 252 344 270 200 344 270 252 347 232 204 3500001000 216 267 345 217 226 I P 345 234 260 345 235 200 \n i f0001020 r e q = ( s t r u c t 302 240 i f r0001040 e q * ) b u f ; \n f o r 302 240 ( i0001060 = ( i f c o n f . i f c _ l e n0001100 / s i z e o f 302 240 ( s t r u c t0001120 302 240 i f r e q ) ) ; i > 0 ; 0001140 i - - ) \n { \n / / i f ( i f r0001160 e q - > i f r _ f l a g s = =0001200 A F _ I N E T ) { / / f o r0001220 i p v 4 \n p r i n t f ( " n a0001240 m e = % s \ n " , i f r0001260 e q - > i f r _ n a m e ) ; \n p0001300 r i n t f ( " l o c a l a d d0001320 r = % s \ n " , i n e t _0001340 n t o a ( ( ( s t r u c t 302 240 s0001360 o c k a d d r _ i n * ) & ( i f0001400 r e q - > i f r _ a d d r ) ) -0001420 > s i n _ a d d r ) ) ; \n i f r0001440 e q + + ; \n / / } \n } \n r e t0001460 u r n 302 240 0 ; \n } \n \n0001473
In this way, we can see where the free '\ 000000' \ 100' is.