When creating a subversion repository, several template template files are uploaded to the file system. When checking the precommit hook example, it indicates that the hook is being executed with the information passed by the argument and, apparently, also STDIN.
Capturing arguments is trivial, but how will the program catch STDIN? The following code fragment, executed in int main (...), cannot collect anything.
char buffer[1024];
std::cin >> buffer;
buffer[1023] = '\0';
What am I doing wrong?
source
share