C++ call read/write without class
by dbrazeau from LinuxQuestions.org on (#53EF1)
I am much more familiar with C than C++, but I am currently looking at a C++ program and am trying to figure out what a specific read and write call do. Example code below.
Code:ssize_t count = ::read(fd, buff, size);
and
ssize_t count = ::write(fd, buff, size);These read and write calls are inside pure virtual read and write functions.
I'm sure this is a basic c++ question, but does calling read and write with just :: and without a class result in the program calling the system's read and write function rather than the current classes virtual read and write functions?


Code:ssize_t count = ::read(fd, buff, size);
and
ssize_t count = ::write(fd, buff, size);These read and write calls are inside pure virtual read and write functions.
I'm sure this is a basic c++ question, but does calling read and write with just :: and without a class result in the program calling the system's read and write function rather than the current classes virtual read and write functions?