我给一个C++框架(即我不能改变),用于IO操作是这样工作在内存中的特定尺寸: 它block_size这是块的大小被读取或写入 每个读/写操作得到这个操作的结构: struct Operation {
size_t block; // index of external memory block
void * data; // here the data will be wri
我有一个非常大的字符串,其中包含2位数字和它们之间的空间按顺序xx xx xx ...等'。 我试图将每个数字转换为int并将其存储在20x20的int数组中。 对于这个任务,我使用memcpy来复制字符串的前2位数字,atoi从char中将int转换为int,而我写的内部函数将字符串“左”移动一圈。 它可以正常工作,例如60号码,然后在程序结束时出错号码。 这是代码: #include <std