Error c2065: "len": undefined identifier error c2065: "k": undefined identifier encountered an error while executing cl.exe.
Your code LEN is undefined, but your comment says "LONG, k; //Define the long integer variable len, k ",plus LEN, the K you defined is lowercase, but you used uppercase in the code behind, so you are prompted to change the undefined variable K to lowercase, and C/C++ should pay attention to the case problem.