Keil CÖÐÓÃunsigned longҪעÒâµÄÎÊÌâ
Keil CÀïÓõ½ÁËunsigned long³¤ÕûÐͱäÁ¿£¬±àÒëʱ¶¼ÄÜͨ¹ý£¬µ«ÔËÐÐʱÀÏÊÇÒç³ö£¬Í¬»ï°Ù¶Èµ½ÁË´ËÌù£¬½â¾öÁËÎÊÌ⣬ÓÚÊÇתÌûÓÚ´Ë£º
½ñÌìµ÷ÊÔÒ»¸ö³Ë·¨£¬³öÁ˵ãÎÊÌ⣬ÏÈ¿´´úÂëʾÒ⣺
void test(void)
{
unsigned long mid1,mid2,mid3;
mid1=6*10000;//index1
mid2=7*10000;//index2
mid="8"*10000;//index3
}
Õ¦Ò»¿´£¬Õâ¶Î´úÂëËƺõÊǶԵģ¬Æäʵ²»È»£¬Èç¹û¸ú×Ùµ÷ÊÔһϴúÂë¾Í»á·¢ÏÖ£º
mid1=0xea60=60000;
mid2=0x1170=4464;
mid3=0x3880=14464;
mid1ÊÇÕýÈ·µÄ£¬mid2ºÍmid3ÊÇ´íÎóµÄ£¡
²úÉú´íÎóµÄÔÒòÊÇ£º
±àÒëÆ÷ÔÚ±àÒëµÄʱºò°Ñ6*10000¡¢7*10000ÒÔ¼°8*10000¼ÆËãµÃÀ´µÄ½á¹û´æÔÚÁËÒ»¸öunsigned intÀàÐ͵ıäÁ¿µ±ÖУ¬unsigned intÀàÐͱäÁ¿µÄ×î´óÖµÊÇ0xffff£¬¼´65536£¬Òò´ËÔÚ index2Óëindex3ÐÐÖз¢ÉúÁËÊý¾ÝÒç³ö£¬µ¼Ö¼ÆËã´íÎó£¡
½â¾ö·½·¨£º
void test(void)
{
unsigned long mid1,mid2,mid3;
mid1=6*(unsigned long)10000;//index1
mid2=7*(unsigned long)10000;//index2
mid="8"*(unsigned long)10000;//index3
}
Çë×¢Ò⣬ÒÔÏ´úÂëÊÇ´íÎóµÄ!ÖÁÓÚ´íÎóÔÒò£¬´ó¼Ò×Ô¼º·ÖÎö°É¡£
void test(void)
{
unsigned long mid1,mid2,mid3;
mid1=(unsigned long)(6*10000);//index1
mid2=(unsigned long)(7*10000);//index2
mid=(unsigned long)(8*10000);//index3
}
Ïà¹ØÎĵµ£º
Ô´Â룺
# include <stdlib.h>
# include <stdio.h>
int main()
{
int month;
int day;
printf("please input the month number: ");
scanf("%d", &mo ......
Ô´Â룺
/* ʹÓÃÑ¡Ôñ·¨ÅÅÐò */
# include <stdio.h>
int main()
{
int i, j, min, temp;
/* ¶¨ÒåÒ»¸öÕûÐ͵ÄһάÊý×é */
int array[10];
/* ÊäÈëÊý¾Ý */
printf("Please input ten integ ......
Ô´Â룺
# include <stdio.h>
void swap(int *x, int *y);
int main()
{
int i, j;
i = 12;
j = 36;
printf("i and j before swapping: %d %d\n", i, j);
&nbs ......
C/C++ Îļþ¶Áд²Ù×÷×ܽá
ÔÚ±à³ÌµÄ¹ý³ÌÖУ¬ÎļþµÄ²Ù×÷ÊÇÒ»¸ö¾³£Óõ½µÄÎÊÌ⣬ÔÚC++BuilderÖУ¬¿ÉÒÔʹÓöàÖÖ·½·¨¶ÔÎļþ²Ù×÷£¬ÏÂÃæÎҾͰ´ÒÔϼ¸¸ö²¿·Ö¶Ô´Ë×÷Ïêϸ½éÉÜ£¬¾ÍÊÇ£º
1¡¢»ùÓÚCµÄÎļþ²Ù×÷£»
2¡¢»ùÓÚC++µÄÎļþ²Ù×÷£»
3¡¢»ùÓÚWINAPIµÄÎļþ²Ù×÷£»
4¡¢»ùÓÚBCB¿âµÄÎļþ²Ù×÷£»
5¡¢ÌØÊâÎļþµÄ²Ù×÷¡£
Ò¼ ......
ÒýÑÔ
¡¡¡¡Ö¸ÕëÊÇC/C++ÓïÑÔµÄÌØÉ«£¬¶øÊý×éÃûÓëÖ¸ÕëÓÐÌ«¶àµÄÏàËÆ£¬ÉõÖÁºÜ¶àʱºò£¬Êý×éÃû¿ÉÒÔ×÷ΪָÕëʹÓá£ÓÚÊǺõ£¬ºÜ¶à³ÌÐòÉè¼ÆÕ߾ͱ»¸ãºýÍ¿ÁË¡£¶øÐí¶àµÄ´óѧÀÏʦ£¬ËûÃÇÔÚCÓïÑԵĽÌѧ¹ý³ÌÖÐÒ²´íÎóµÃ¸øѧÉú½²½â£º"Êý×éÃû¾ÍÊÇÖ¸Õë"¡£ºÜÐÒÔË£¬ÎҵĴóѧÀÏʦ¾ÍÊÇÆäÖÐÖ®Ò»¡£Ê±ÖÁ½ñÈÕ£¬ÎÒÈÕ¸´Ò»ÈյؽøÐÐ×ÅC/C++ÏîÄ¿µÄ¿ª·¢£¬¶ ......