当我在Mac上运行程序时,它工作正常,但是当我使用Visual Studio进行操作时,出现此错误:
无法打开源文件err.h
还有其他方法可以处理Visual Studio中的错误吗?还是我打电话不正确?
#include <err.h>
这是我尝试在代码中使用err的方式:
switch (select(1, &readfds, NULL, NULL, &tmo)) {
case -1:
err(1, "select"); // This throw an error
break;
case 0:
printf("You did not enter your password within 5 seconds\n");
return (1);
break;
}
答案 0 :(得分:0)
整个//cardContainerTesting
Vector3 testingContainerCoords= new
Vector3(0, 1, -1);
GameObject testingCardObjectInstance = Instantiate(testingCardCOntainerGameObject, testingContainerCoords, Quaternion.identity);
NetworkServer.Spawn(testingCardObjectInstance);
SpriteRenderer objectSprite = testingCardObjectInstance.GetComponent<SpriteRenderer>();
objectSprite.sprite = testingSprite1;
//GenericGameObjectExampleTesting
Vector3 origin = new Vector3(0, 0, -1);
GameObject instantiatedPrefab = Instantiate(myPrefabExample, origin, Quaternion.identity);
NetworkServer.Spawn(instantiatedPrefab);
SpriteRenderer exampleSpriteRenderer = instantiatedPrefab.GetComponent<SpriteRenderer>();
exampleSpriteRenderer.sprite = testingSprite2;
(带有<err.h>
,err()
,errx()
等)实际上是BSD事物@EdHeal。
Linux adopted it-很聪明。微软没有-愚蠢的。与warnx
一起,这是用于适当的命令行实用程序的非常方便的API。
如果程序中只有一个<sysexits.h>
调用,则可以将其替换为:
err()