C ++:循环条件连续执行时,循环体永远不会执行(C++: While loop condition executes continuously, loop body never executes)
这段代码有什么问题? 为什么循环条件反复执行而循环体从不这样做? 这让我疯了! 我看不出问题:
bool test() { std::cout << "condition!" << std::endl; return true; } while(test()); { std::cout << "This message never appears!!!" << std::endl; }
输出:
condition! condition! condition! ...forever
What is wrong with this code? Why does the loop condition execute repeatedly while the loop body never does? It is driving me insane! I can't see the problem:
bool test() { std::cout << "condition!" << std::endl; return true; } while(test()); { std::cout << "This message never appears!!!" << std::endl; }
output:
condition! condition! condition! ...forever
原文:
最满意答案
我猜你的Pi上有Windows 10 IoT-Core Build 10586,但是你没有安装Visual Studio 2015 Update 1。 您需要在构建10586中使用新的通用(非加密模式)身份验证方法。您可以在此处阅读有关此问题的更多信息: http ://embedded101.com/Blogs/David-Jones/entryid/721/Win-10-IoT- 核心视觉工作室2015年-更新- 1 -应用程序-部署-和调试,要求
I'm guessing you have Windows 10 IoT-Core Build 10586 on your Pi, but you don't have Visual Studio 2015 Update 1 installed. You need to use the new Universal (Unencrypted Mode) authentication method with build 10586. You can read more about this issue here: http://embedded101.com/Blogs/David-Jones/entryid/721/Win-10-IoT-Core-Visual-Studio-2015-Update-1-App-Deployment-and-Debug-Requirements
相关问答
更多-
根据您收到的错误“Build Action'Embedded Ressource'”。 您可能希望确保解决方案资源管理器中没有任何项目设置为嵌入式资源的构建操作。 您可以在解决方案资源管理器中进行检查,如下所示: Based on the error you are receiving "Build Action 'Embedded Ressource'". You may want to ensure that you do not have any items in your Solution Expl ...
-
Raspberry Pi 3上的Windows 10 iot可以运行java程序吗?(Can Windows 10 iot on Raspberry Pi 3 run java program well?)[2022-01-01]
截至今天,没有人将Java移植到Windows IOT用于ARM CPU。 对于其他软件包来说,它看起来同样黯淡。 Java在Linux上的Raspberry Pi上运行得很好,无论如何,它是Raspberry的首选操作系统。 至于原因,在教育之外,没有理智的人会想要使用Windows IOT。 没有商业利益,公司有动力提供支持。 微软似乎在营销WindowsIOT上投入更多资金,然后实际投资于软件。 As of today nobody has ported Java to Windows IOT for ... -
在Windows IOT Core上为Raspberry pi2创建appx文件?(Create appx file for Raspberry pi2 on Windows IOT Core?)[2023-08-23]
第1步:构建 从Visual Studio创建应用程序包: 右键单击您的项目 选择商店...创建应用包 选择“否”以创建要上载到Windows应用商店的包 在下一步中,为“生成应用程序包”选择“从不”,并确保选中“ARM”。 单击“创建” Raspberry Pi兼容版本将位于“。\ AppPackages \ XX_ARM_XX”文件夹中。 第2步:安装 在Raspberry Pi上安装应用程序: 打开“Windows Device Portal”网站 从侧边菜单中选择“应用程序” 从build文件夹上传 ... -
为Raspberry Pi 2忘记Windows 10 IOT密码[关闭](Forgot Windows 10 IOT Password For Raspberry Pi 2 [closed])[2023-04-18]
这是重新成像的最简单方法。 保持方便的一件事是您在笔记本电脑上加载Pi的图像,这样您就可以快速重新加载它。 在Pi上设置所有内容后创建图像,或者为每个步骤设置多个图像以节省下载/重新编译多个包。 It's the easiest way to reimage. One thing to keep handy is the image you are loading on your Pi on your laptop so you can just reload it quickly. Create the ... -
10月内部人员发布了板载串口。 我修改了串行示例,到目前为止已经有了混合的结果。 它有一个问题似乎是,如果在初始化端口时将数据发送到pi,则会抛出异常。 现在尝试解决它。 The October insider release has the onboard serial enabled. I have modified the serial example and have had mixed results so far. One issue that it has seems to be that i ...
-
从谷歌能告诉我,答案是肯定的。 你的应用程序不能是无头的(所以有UI和屏幕,这是有道理的)。 这是我能找到的例子。 看起来移动被限制在一个Xaml UI对象上。 https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.uielement.pointerpressed From what google was able to tell me, the answer is yes. You're app cannot be he ...
-
Raspberry pi 2物联网(Raspberry pi 2 IoT)[2022-05-20]
您可以使用任何“支持的”USB转串口适配器连接到GSM模块。 尽管MS提供的支持硬件列表有点混乱...... 我使用的是“Silabs CP2102”芯片,但它需要不时重新插入,因为它似乎冻结在Win 10 IoT核心上...... You could use any 'supported' USB-to-Serial adapter to connect to the GSM module. Altough the list of supported hardware offered by MS is a ... -
您可以运行嵌入在应用程序中的SQLite等数据库系统。 You are able to run a database system such as SQLite embedded within your app.
-
我猜你的Pi上有Windows 10 IoT-Core Build 10586,但是你没有安装Visual Studio 2015 Update 1。 您需要在构建10586中使用新的通用(非加密模式)身份验证方法。您可以在此处阅读有关此问题的更多信息: http ://embedded101.com/Blogs/David-Jones/entryid/721/Win-10-IoT- 核心视觉工作室2015年-更新- 1 -应用程序-部署-和调试,要求 I'm guessing you have Windo ...
-
从IoR Onboarding中选择适配器后,单击开始共享服务,将显示一条消息“Internet conncetion sharing has started”,但我在其他设备上找不到网络。 您可以打开Windows Device Portal并将raspberry pi3设置为以下指令 。 在此之前,您可以将覆盆子pi3与WLAN连接。 选择页面左侧的IoT Onboarding选项。 然后必须选择适配器配置。 您可以选择接入点适配器Microsoft Wi-Fi Direct虚拟适配器#2,然后选择共享 ...