好,
所以我被困在这里.我有一个程序的代码,系统地执行基于算法的人站在一个圆圈,但我有一个问题,它在发布模式崩溃.如果我使用调试器(codeblocks)运行它,我的代码运行正常,但如果我不运行它会崩溃.我在网上四处看看,我发现的唯一的东西是未初始化的变量,但我试着在声明时立即为我的变量设置值,但它没有解决问题.
如果有人能看到我的问题,我将非常感谢帮助.
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
// if the program does not work, please run in debugger mode. It will work.
void remove_person(int** array, int arraySize, int position)
{
int i;
for (i = 0; i < arraySize; ++i)
printf("%d ", (*array)[i]);
printf("\n");
int* temp = malloc((arraySize - 1) * sizeof(int)); // create temporary array smaller by one element
memmove(temp,*array,(position+1)*sizeof(int)); // copy entire array before position
memmove(temp+position,(*array)+(position+1),(arraySize - position)*sizeof(int)); // copy entire array after postion
for (i = 0; i …Run Code Online (Sandbox Code Playgroud) CREATE TABLE Existing_medical_condition (
condition VARCHAR(50) NOT NULL,
date_of_diagnosis DATE, treatment TEXT,
pssn INT NOT NULL,
CONSTRAINT emc_key PRIMARY KEY(condition, pssn),
FOREIGN KEY(pssn) REFERENCES Patient(ssn)
);
Run Code Online (Sandbox Code Playgroud)
给出错误:
错误1064(42000):您的SQL语法有错误; 查看与您的MySQL服务器版本对应的手册,以便在第1行的'condition VARCHAR(50)NOT NULL,date_of_diagnosis DATE,treatment TEXT,pssn INT'附近使用正确的语法