我有一个 C++ 代码,其中我使用 system()
使用 sql 加载程序。当 SQL Loader 在运行代码时执行时,我收到了下面提到的我想禁用的消息:
SQL*Loader: Release 10.2.0.1.0 - Production on Thu Mar 14 14:11:25 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 20
Commit point reached - logical record count 40
Commit point reached - logical record count 60
Commit point reached - logical record count 80
最佳答案
请记住,system
函数使用 shell 来执行命令。所以你可以使用普通的 shell 重定向:
system("/some/program > /dev/null");
关于c++ - 为 sql loader 禁用 c++ 输出消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15405448/