c/c++ÖÐһЩÊý×éµÄ²Ù×÷ÕýÎó - C/C++ / C++ ÓïÑÔ
1£ºÏÂÃæΪһ¸ö¼òµ¥Ð¡³ÌÐò£¬Ã¿¸öÊä³öºóÃæÓÐÓÃ/* */Òý×¢½á¹û£»ÓÐЩ½á¹ûÎÒд³öÁË×Ô¼ºµÄÀí½â£¬µ«²»Öª¶Ô²»¶Ô£¬ÄÜ·ñ°ïÎÒ¿´ÏÂ
2£ºÌرðÊÇ×Ö·ûÊý×飬Èça£¬ÔõôÊä³ö a[1],a[2]µÄµØÖ·ÄØ£¿Ð¡µÜһֱû¸ã¶®
#include<iostream>
using namespace std;
int main()
{
char a[] = {"abc"};
char b[4] = {'d','e','f'};
int c[] = {1,2,3};
int d[4] = {4,5,6};
cout << a << endl;/* abc */
cout << &a << endl;/* 0012ff5c */
cout << &a[0] << endl;/* abc *//*´Ë´¦µÈͬ&(a[0])*/
cout << &a[1] << endl;/* bc */ /*´Ë´¦µÈͬ&(a[1])*/
cout << endl;
cout << (&a)[0] << endl;/* abc (¿É¿´³Échar m[][4];m = &a;´Ë´¦Îªm[0])*/
cout << (&a)[1] << endl; /* ÂÒÂë(¿É¿´³Échar m[][4];m = &a;´Ë´¦Îªm[1]) */
cout << &(a[0]) << endl;/* abc */
cout << &(a[1]) << endl;/* bc */
cout << endl;
cout << b << endl;/* def */
cout << &b << endl;/* 0012ff4c */
cout << &b[0] << endl;/* def */
cout << &b[1] << endl;/* ef */
cout << endl;
cout << "c" << endl;
cout << c << endl;/* 0012ff38 */
cout &
Ïà¹ØÎÊ´ð£º
ÈçÌ⣬C/C++ÖеÄexeclÔõôµ÷ÓÃдºÃµÄjava³ÌÐò£¬
execl("/opt/java1.5/bin/java","MyClass",NULL);
ÕâÑùµÄ²»ÐÐŶ¡£
²»»á.
ÔËÐÐjava³ÌÐò
ÕÒ¹¤¾ß²é¿´Ò»ÏÂÄǸö³ÌÐòµÄÃüÁîÐÐ
ËÑË÷Ï£ºjni ......
ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À²®ÎĵÄ×Ö¿âÄãÓÐô£¿
ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......
visual c++2008Ëٳɰ棬²»ÄܱàÒëC³ÌÐòÂð£¿Èç¹ûÄÜÊÇÔõô¿ªÊ¼µÄ°¡£¿ÓÃËü´øµÄÃüÁîÌáʾµ¥Ôª³ýÍâ ¡£
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£©
¾ø¶Ô¿ÉÒÔ¡£½¨Á¢win32¿ØÖÆ̨³ÌÐò¾Í¿ÉÒÔ
ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£ ......
ÈçºÎ½«Ò»¸öListBoxÖеÄÊý¾Ý´æÔÚÊý¾Ý¿âÖеÄÒ»¸ö×Ö¶ÎÏÂÃ棬²¢ÇÒÿÌõ¼Ç¼µÄ×Ö·û´®¸öÊý²»Ò»¶¨ ÒÔ¼°ÈçºÎ´ÓÊý¾Ý¿âÖжÁÈ¡¸ÃListBoxÖеÄËùÓмǼ
C/C++ code:
//´æÈëÊý¾Ý¿â
void __fastcall TForm1::Button5Click(TO ......