由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 定义的struct数组很大时,为什么会出现奇怪的大数字?
相关主题
请教这个程序里用到了什么constructor啊?有几个copy constructor?Transfer elements in a stack to another preserving order
一个读用户输入的小问题C++菜问: 怎么这样也可以?
int i:1请问一个exception题目
请问C++中局部未使用的变量在优化的时候会去掉么?Use Visual .NET for C++ programming
为什么foo1可以而foo2不行?三个C syntax 弱问题
菜鸟求教,一个c++的困惑奇怪的问题:关于一个简单的malloc()小程序 (转载)
还是咱们这儿,亲。这个C++程序为什么不能运行
求助 怎么编辑 多个 .c files(比如a.c, b.c) 和一个.h file(ab (转载)a question on C++ string
相关话题的讨论汇总
话题: int话题: define话题: struct话题: unsigned话题: 3452816845
进入Programming版参与讨论
1 (共1页)
w****h
发帖数: 212
1
运行时出线如3452816845 3452816845 3452816845这种奇怪的大数字
以下我本来用的是int,也有类似的错误。不知道哪里来的。
#define C 10000 //define a fixed maximum capacity for the list that can
be taken away of knapsack
#define N 200 //define number of items for the list
struct body { //define a struct with three parts, the item name, size and
value
unsigned int name;
unsigned int size;
unsigned int value;
};
typedef struct body Plist;
void disp(Plist*, unsigned int);
int _tmain(int argc, _TCHAR* argv[])
{
srand((un
O******e
发帖数: 734
2
Run in debugger to trace the problem.

and

【在 w****h 的大作中提到】
: 运行时出线如3452816845 3452816845 3452816845这种奇怪的大数字
: 以下我本来用的是int,也有类似的错误。不知道哪里来的。
: #define C 10000 //define a fixed maximum capacity for the list that can
: be taken away of knapsack
: #define N 200 //define number of items for the list
: struct body { //define a struct with three parts, the item name, size and
: value
: unsigned int name;
: unsigned int size;
: unsigned int value;

w****h
发帖数: 212
3
我不知道怎么在debugger中trace,只会在delphi里trace
但这个问题我已经解决了,多谢

【在 O******e 的大作中提到】
: Run in debugger to trace the problem.
:
: and

1 (共1页)
进入Programming版参与讨论
相关主题
a question on C++ string为什么foo1可以而foo2不行?
char ** pt1和 char * pt2[] 的区别在哪?菜鸟求教,一个c++的困惑
A aimple C++ question还是咱们这儿,亲。
What is wrong with the code?求助 怎么编辑 多个 .c files(比如a.c, b.c) 和一个.h file(ab (转载)
请教这个程序里用到了什么constructor啊?有几个copy constructor?Transfer elements in a stack to another preserving order
一个读用户输入的小问题C++菜问: 怎么这样也可以?
int i:1请问一个exception题目
请问C++中局部未使用的变量在优化的时候会去掉么?Use Visual .NET for C++ programming
相关话题的讨论汇总
话题: int话题: define话题: struct话题: unsigned话题: 3452816845