Home > OS >  Questions about Windows file to the abnormal letters under Linux
Questions about Windows file to the abnormal letters under Linux

Time:10-10

One of my Windows under the Shared folder to Linux and then wrote a following CPP
 
#include
#include
#include

Int main (void)
{
Int epfd, NFDS;
Epfd=epoll_create (1);
Ev. Data. Fd=STDIN_FILENO;
Ev. Events=EPOLLIN | EPOLLET;
Epoll_ctl (epfd, EPOLL_CTL_ADD, STDIN_FILENO, & amp; Ev);
For (;; )
{
NFDS=epoll_wait (epfd, events, 5, 1);
for(int i=0; i {
If (events [I]. Data. Fd==STDIN_FILENO)
Printf (" welcome to epoll 's word! \n");

}
}
}

Then I use the cat - v,
Int main (void) $
{$
Int epfd, NFDS; $
^ Istruct epoll_event ev, events [5]. $
M -! M -! M -! M -! Epfd=epoll_create (1); $
M -! M -! M -! M -! Ev. Data. Fd=STDIN_FILENO; $
M -! M -! M -! M -! Ev. Events=EPOLLIN | EPOLLET; $
M -! M -! M -! M -! Epoll_ctl (epfd, EPOLL_CTL_ADD, STDIN_FILENO, & amp; Ev); $
M -! M -! M -! M -! For (;; ) $
M -! M -! M -! M -! {$
M -! M -! M -! M -! M -! M -! M -! M -! NFDS=epoll_wait (epfd, events, 5, 1); $
M -! M -! M -! M -! M -! M -! M -! M -! for(int i=0; i M -! M -! M -! M -! M -! M -! M -! M -! {$
M -! M -! M -! M -! M -! M -! M -! M -! M -! M -! M -! M -! If (events [I]. Data. Fd==STDIN_FILENO) $
M -! M -! M -! M -! M -! M -! M -! M -! M -! M -! M -! M -! M -! M -! M -! M -! Printf (" welcome to epoll 's word! \n"); $
$
M -! M -! M -! M -! M -! M -! M -! M -! } $
M -! M -! M -! M -! } $
} $

Ask what is this situation should not be ^ M

CodePudding user response:

^ M is a newline, what's the problem?

CodePudding user response:

reference 1st floor wisewoman response:
^ M is a line break, what's the problem?

Now the question is not a newline,,,

CodePudding user response:

Coding problem? The same as utf-8
  • Related