when would i ever/when would it be a good idea, to ever explicitly use
__int8 nSmall; // Declares 8-bit integer
__int16 nMedium; // Declares 16-bit integer
__int32 nLarge; // Declares 32-bit integer
__int64 nHuge; // Declares 64-bit integer


over regular int?? in your program

When you want your program to be portable

When you want your program to be portable

Excuse me? Don't you mean not portable?

You wouldn't use them. IMO, they are unnecessary.

i think he means portable to specific 16/32/and 64 bit windows applications ;)

Around here, portable means works on all compliant compilers of the Language Standard.

if i compiled a program on a 64bit PC would it not work on a 32bit/16 bit machine then? or would it work?

if i didnt use these to make a windows application

Microsoft says what I wrote above: http://msdn.microsoft.com/en-us/library/29dh1w7z%28v=vs.80%29.aspx

Since M$ is only concerned with M$, what they say is perfectly valid -- for the M$ world. But they are not the only game in town, and these forums cater to all games, not just the M$ world. Hence, portable has a different meaning.

IOW, portable does not mean "Works with Microsoft" here.

so....would a program compiled on a 64bit pc not work for a 32 bit pc?

so....would a program compiled on a 64bit pc not work for a 32 bit pc?

That really depends since you can create 32 bit PC programs with 64 bit PC compilers.

so what determines wether it only works for a 64 bit system??

so what determines wether it only works for a 64 bit system??

If memory addresses are 64 bit then it'll only work on a 64 bit CPU.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.