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)
{
......
´ó¼ÒºÃ£º
ÎÒÏëʵÏÖ¼ì²âµ½²åÈëSD¿¨ºó×Ô¶¯½«SD¿¨¸ñʽ»¯µÄ¹¦ÄÜ£¬²»ÖªC/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý£¿
ÁíÍ⣬ÎÒ²»ÏëʹÓÃSHFormatDrive£¬ÒòΪÕâ¸öº¯Êý»áµ¯³öÊÇ·ñÒª¸ñʽ»¯µÄÌáʾ¿ò£¬ÎÒÐèÒªµÄÊÇϵͳ×Ô¶¯¸ñʽ»¯£¬¶ø²Ù×÷Õß² ......
ËÄܰïÎÒ°ÑÏÂÃæÕâЩ´úÂë¸Ä³ÉVBÐÎʽµÄ£¬¶àлÁË£¬¼±ÓÃ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......
visual c++2008Ëٳɰ棬²»ÄܱàÒëC³ÌÐòÂð£¿Èç¹ûÄÜÊÇÔõô¿ªÊ¼µÄ°¡£¿ÓÃËü´øµÄÃüÁîÌáʾµ¥Ôª³ýÍâ ¡£
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆÌ¨£©
¾ø¶Ô¿ÉÒÔ¡£½¨Á¢win32¿ØÖÆÌ¨³ÌÐò¾Í¿ÉÒÔ
ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆÌ¨£ ......