Talk about anything and everything not related to this site or the Dreamcast, such as news stories, political discussion, or anything else. If there's not a forum for it, it belongs in here. Also, be warned that personal insults, threats, and spamming will not be tolerated.
In that line of code I have ot change the literal value 100 to the largest number that can be stored in a variable of type int. Now i have no idea what this is, anyone who can help by pointing me the dircection of a site with it, or can tell me, it would be a lot of help.
Edit: Is it 32,767?
Edit 2: I used INT_MAX, and got an error, but the lab asked if I got an error messgae, and it gave me high valuves for test +1, so I asume that is right?
Disheveled DrFreeze wrote:if you have a book then you should be able to look up how many Bytes the datatype INT takes up
also, be sure to check if its a signed or unsigned int
We've only done thei ntroduction chapter, and it had nothing about programs in there. All thei ntroduction program did was talk about the different componts of machines.
int
4 bytes, signed (two's complement). -2,147,483,648 to 2,147,483,647. Like all numeric types ints may be cast into other numeric types (byte, short, long, float, double). When lossy casts are done (e.g. int to byte) the conversion is done modulo the length of the smaller type.
They are trying to get you to look at sun.com's online references probably. Java is extremely well documented and it's worth looking at just to see what you can pull off.
I turned in the lab hopeing for the best. I just set the value as int_max and got no compiling errors. It may not be right, but it was only one question. I have another lab toom, which will probably be really annoying, and also my first program is due Thursday by 11:59pm.