下面的代码编译,但点击第一个按钮后,它打破了msg
deming.exe中0x0133ae9a处的未处理异常:0xC0000005:访问冲突写入位置0x014aedbd.
这是一个c ++错误,因为我是新手还是我使用的dragonsdk?
//====================================================
// App.cpp
//====================================================
#include "DragonFireSDK.h"
#include <string.h>
int Picture;
int OnClick(int value)
{
char* image = "Images/image";
image = strcat(image,"_");
Picture = PushButtonAdd(image, 10, 100, OnClick, 1);
return 0;
}
void AppMain()
{
// Application initialization code goes here. Create the items / objects / etc.
// that your app will need while it is running.
Picture = PushButtonAdd("Images/Logo", 10, 100, OnClick, 1);
}
Run Code Online (Sandbox Code Playgroud)
你在这里失败了:
char* image = "Images/image";
image = strcat(image,"_");
Run Code Online (Sandbox Code Playgroud)
您正在尝试修改常量字符串.
归档时间: |
|
查看次数: |
164 次 |
最近记录: |