2017年我的视觉工作室似乎不想承认我的进口商品? 在构建时,我在第18行收到错误“C2065:'注册表':未声明的标识符”,即使清楚地包含了Registry.h,我也会创建一个注册表列表。我在这做错了什么?当我寻找答案时,我只是发现错误试图使用未包含的内容的东西。
def cifrar(word, BASE, CIFRA_CODE):
table = str.maketrans(BASE, CIFRA_CODE)
return print(word.translate(table))
def decifar(word, BASE, CIFRA_CODE):
table = str.maketrans(CIFRA_CODE, BASE)
return print(word.translate(table))
def main():
BASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
CIFRA_CODE = "DEFGHIJKLMNOPQRSTUVWXYZABC"
menu = int(input("(1) Crypto (2) Decrypt: "))
word = input("Enter the word: ").upper()
if menu == 1:
cifrar(word, BASE, CIFRA_CODE)
elif menu == 2:
decifar(word, BASE, CIFRA_CODE)
if __name__ == "__main__":
main()