e.g.
readDataFromFile("confidential.dat")
or
#include "confidential.h"
(...)
You can have a file that holds that info and then the program just reads from there, or you can have that info in a source code file that you include in the main program. Just don't share them with the rest of the source code and you're set ;)
e.g.
readDataFromFile("confidential.dat")
or
#include "confidential.h"
(...)
这样做的方式与将 pi 转化为有理数的方式相同。您不能将分布式程序中的 IP 地址设为秘密。 'netstat' 如果没有其他任何东西会在程序连接到您的服务器后立即显示它。
You would do this the same way you would make pi into a rational number. You can't make an IP address in a distributed program a secret. 'netstat' if nothing else will reveal it as soon as the program makes a connection to your server.
发布评论
评论(2)
您可以有一个包含该信息的文件,然后程序从那里读取,或者您可以在包含在主程序中的源代码文件中包含该信息。只要不要与其余源代码共享它们就可以了;)
You can have a file that holds that info and then the program just reads from there, or you can have that info in a source code file that you include in the main program. Just don't share them with the rest of the source code and you're set ;)
这样做的方式与将 pi 转化为有理数的方式相同。您不能将分布式程序中的 IP 地址设为秘密。 'netstat' 如果没有其他任何东西会在程序连接到您的服务器后立即显示它。
You would do this the same way you would make pi into a rational number. You can't make an IP address in a distributed program a secret. 'netstat' if nothing else will reveal it as soon as the program makes a connection to your server.