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 &
Ïà¹ØÎÊ´ð£º
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
ÇëÎÊVFPÖÐÈçºÎµ÷ÓÃC/C++º¯Êý£¿
ÄãÒªµ÷ÓÃʲô¹¦Äܵĺ¯Êý£¿Òª¿´¿´VFPÖÐÓÐûÓжÔÓ¦µÄº¯Êý£¬Èç¹ûÓоÍÊ¡×ÅÔÙµ÷ÓÃÁË¡£Èç¹ûûÓУ¬¿ÉÒÔ½«C/C++º¯Êýд¸öDLL»òFLL£¬È»ºóÔÚVFPµ÷Óü´¿É¡£
Ê®¶¹Èý ÀÏʦ£¬Ôõô²ÅÄÜÐÞ¸Ä×Ô¼ºµÄ ......
ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À²®ÎĵÄ×Ö¿âÄãÓÐô£¿
ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......
ͦ·±Ëö£¬Ö®Ç°·¢µÄÌû×Ó£¬·Öֵ̫µÍÏÖÔÚÖØ·¢Ò»¸ö¡£»¶Ó¸÷λ´óÏÀ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[] ......
ÔھƵê¹ÜÀíϵͳÖÐ,ÓÐÒ»¸ö¶ÔÄÚµÄϵͳ,¹©Ç°Ì¨·þÎñÔ±ºÍ¾ÀíʹÓÃ
»¹ÓÐÒ»¸ö¾ÍÊǶÔÍâ,Èÿͻ§¿ÉÒÔÔÚÍøÉÏÔ¤¶©·¿¼ä,
ËüÃÇÖ®¼äÊÇÔõôͨѶµÄ.?µ±ÎÒÌá½»Ô¤¶©·¿¼äÐÅÏ¢µÄʱºò,
ÔÚ¶ÔÄÚµÄϵͳÖÐ,ÈçºÎÖªµÀÎÒÒѾÌá½»ÁËÐÅÏ¢¹ýÈ¥.Ê¹Ç ......