C\C++Ïà¹ØÎÊÌâÕûÀí£¨1£©
Ëæ»úÉú³ÉÕûÊý£¬È»ºóËã³öÕý¸ºÁã
void getrand(int *a, int m)
{
int i;
srand(time(NULL));
for (i=0; i<m; i++)
{
a = rand()-rand();
}
}
int main(int argc, char* argv[])
{
int zhengshu=0,fushu=0,zero=0;
int n[MAX];
int i;
for(i=0;i<MAX;i++){
scanf("%d",n+i);
}
//getrand(n,MAX);
//´Ë´¦ÊÇÓÃËæ»úÊý²âÊÔ
for(i=0;i<MAX;i++){
if(n>0)zhengshu++;
else if(n==0)zero++;
else fushu++;
printf("%d ",n);
}
printf("¸ºÊýµÄ¸öÊýÊÇ%d",fushu);
printf("ÕûÊýµÄ¸öÊýÊÇ%d",zhengshu);
printf("ÁãµÄ¸öÊýÊÇ%d",zero);
return 0;
}
1.ʵÏÖÏÂÃæÀàµÄĬÈϹ¹Ô캯ÊýºÍ±ØÒªµÄ¸´ÖÆ¿ØÖƳÉÔ±¡£
class TreeNode{
public:
private:
std::string value;
int count;
TreeNode *left;
TreeNode *right;
};
class TreeNode{
public:
TreeNode():count(0),left(0),right(0){}
TreeNode(const TreeNode &org):value(org.value),count(org.count){
if(org.left)left=new TreeNode(*org.left);
else left=0;
&n
Ïà¹ØÎĵµ£º
Ç°ÃæһƪÎÒÃǽéÉÜÁ˽ṹÌ壬ÕâƪÖÕÓÚÄܹ»½éÉܺ¯ÊýÁË¡£ÎªÊ²Ã´Õâô˵ÄØ£¿ÒòΪº¯Êý·Ç³£ÖØÒª¡£¾ÍÕâô¼òµ¥¡£ºÙºÙ£¡Ö®ËùÒÔÔÚÕâʱ²Å½²º¯Êý£¬ÊÇÒòΪ±¾Æª½«ÁªÏµµ½Ç°ÃæµÄÿһƪ£¬ÕâÑùº¯Êý²ÅÄÜÌåÏÖµÄ͸³¹¡£ÄÇÎÒÃǾÍÆȲ»¼°´ýµÄÇÐÈëÕýÌâ¡£
´ÓµÚһƪHelloworld¿ªÊ¼µ½ÏÖÔÚ£¬¾ÍûÓÐÍÑÀ뺯Êý¡£ÄǾÍÊÇÎÒÃǵÄmainº¯Êý¡£mainº¯ÊýÒ²ÊÇÒ»¸öÆÕͨµÄ ......
Äã˵ÊÇд¸ö¶¯Ì¬¿â²»¾ÍÐÐÁË£¬»¹ËµÐ´½Å±¾£¬½Å±¾¸ú¶¯Ì¬¿â²î±ð´óÈ¥ÁË
gcc±àÒëµÄʱºò¾ÍÄÜÉú³É¶¯Ì¬Á¬½Ó¿â
windowsÏÂÃæûÓÐsoµÄ¸ÅÄwindows½Ðdll
ËÑÏÂLinux gcc ¶¯Ì¬¿â
±àдºÃcÓïÑÔ³ÌÐò£¬¾ÍÊÇfileϵͳµ÷Óõļ¸¸öº¯Êý£¬fopen,freadÖ®ÀàµÄ
gcc±àÒë³ÉsoÎļþ£¬Ò»¸öÃüÁî¾Í¸ã¶¨£¬ÎÒÍü¼Ç¾ßÌåµÄÑ¡ÏîÁË ......
±àÒ룬±àÒë³ÌÐò¶ÁÈ¡Ô´³ÌÐò£¨×Ö·ûÁ÷£©£¬¶ÔÖ®½øÐдʷ¨ºÍÓï·¨µÄ·ÖÎö£¬½«¸ß¼¶ÓïÑÔÖ¸Áîת»»Îª¹¦ÄܵÈЧµÄ»ã±à´úÂ룬ÔÙÓÉ»ã±à³ÌÐòת»»Îª»úÆ÷ÓïÑÔ£¬²¢ÇÒ°´ÕÕ²Ù×÷ϵͳ¶Ô¿ÉÖ´ÐÐÎļþ¸ñʽµÄÒªÇóÁ´½ÓÉú³É¿ÉÖ´ÐгÌÐò¡£
CÔ´³ÌÐòÍ·Îļþ££>Ô¤±àÒë´¦Àí(cpp)££>±àÒë³ÌÐò±¾Éí££>ÓÅ»¯³ÌÐò££>»ã±à³ÌÐò££>Á´½Ó³ÌÐò--> ......
1.ÒýÑÔ
¡¡¡¡C++ÓïÑԵĴ´½¨³õÖÔÊÇ“a better C”£¬µ«ÊÇÕâ²¢²»Òâζ×ÅC++ÖÐÀàËÆCÓïÑÔµÄÈ«¾Ö±äÁ¿ºÍº¯ÊýËù²ÉÓõıàÒëºÍÁ¬½Ó·½Ê½ÓëCÓïÑÔÍêÈ«Ïàͬ¡£×÷ΪһÖÖÓûÓëC¼æÈݵÄÓïÑÔ£¬C++±£ÁôÁËÒ»²¿·Ö¹ý³ÌʽÓïÑÔµÄÌصã(±»ÊÀÈ˳ÆΪ“²»³¹µ×µØÃæÏò¶ÔÏó”)£¬Òò¶øËü¿ÉÒÔ¶¨Òå²»ÊôÓÚÈκÎÀàµÄÈ«¾Ö±äÁ¿ºÍº¯Êý¡£µ«ÊÇ£¬C++±Ï¾¹Ê ......