gpt4 book ai didi

c++ - Visual Studio Express 2013 错误

转载 作者:行者123 更新时间:2023-11-28 06:29:42 26 4
gpt4 key购买 nike

每次我制作一个新程序时,我都会在编译时遇到这个错误,以前我使用 2012 并且从来没有遇到过这个问题,但现在我每次都看到这个:

错误:

Error   2   error LNK2019: unresolved external symbol 
"public: __cdecl lonework::App::App(void)" (??0App@lonework@@Q$AAA@XZ)
referenced in function "public: void __thiscall <lambda_b6bf150325cab1ba448790bcac21fea0>::operator()(class Windows::UI::Xaml::ApplicationInitializationCallbackParams ^)
const " (??R<lambda_b6bf150325cab1ba448790bcac21fea0>@@QBEXP$AAVApplicationInitializationCallbackParams@Xaml@UI@Windows@@@Z) C:\Users\Logan\Documents\Visual Studio
2013\Projects\lonework\lonework\lonework.Windows\XamlTypeInfo.g.obj lonework.Windows

目前正在处理的代码:

#include <pch.h>
#include <conio.h>
#include <stdio.h>
#include <Windows.h>

int yes();
int no();

int main()
{
char choice;
printf("Think of a number between one and ten\n");
Sleep(2000);
printf("Got it yet?\n Y/N ");
scanf_s("%c", &choice,1);
if (choice == 'y' || choice == 'Y')
{
printf("That's good");
yes();
}
else if (choice == 'n' || choice == 'N')
{
printf("Are you really that slow");
no();
}
getchar();
return 0;
}
int yes()
{
printf("Good for you, keep thinking about it...\n");
printf("Now think of another one, a different one\n Got it?\n I'll assume yes, sounds good.\n Now I'll tell you your number.\n");
printf("...\n");
Sleep(2000);
printf("...\n");
Sleep(2000);
printf("Ahem, 3 and 7");
return 0;
}
int no()
{
printf("Alright, back to the top.\n");
main();
return 0;
}

最佳答案

确保在创建新项目时选择空项目或 C++ 控制台应用程序而不是托管 C++ 应用程序。

关于c++ - Visual Studio Express 2013 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27833189/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com