Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C++³ÌÐòµ÷ÓÃCº¯Êý

ÕâÖÖÐèÇóºÜ¶à,ÓÖÒòΪC++ºÍCÊÇÁ½ÖÖÍêÈ«²»Í¬µÄ±àÒëÁ´½Ó´¦Àí·½Ê½,ËùÒÔÒªÉÔ¼Ó´¦Àí.×ܽá´óÖÂÓÐÁ½´óÀàʵÏÖ·½·¨.
ÎÄÖиø³öµÄÊÇÍêÕûµÄ,¾ßÌåµÄ,µ«ÓÖ×î»ù±¾×î¼òµ¥µÄʵÏÖ,ÖÁÓÚÀíÂÛÐԵĶ«Î÷ÔÚÍøÉϺÜÈÝÒ×ËÑË÷µÄµ½.
Ò».ͨ¹ý´¦Àí±»µ÷ÓõÄCÍ·Îļþ
a.h:
#ifndef __A_H
#define __A_H
#ifdef __cplusplus
extern "C" {
#endif
int ThisIsTest(int a, int b);
#ifdef __cplusplus
}
#endif
#endif
a.c:
#include "a.h"
int ThisIsTest(int a, int b) {
  return (a + b);
}
aa.h:
class AA {
  public:
      int bar(int a, int b);
};
aa.cpp:
#include "a.h"
#include "aa.h"
#include "stdio.h"
int AA::bar(int a, int b){
    printf("result=%d\n", ThisIsTest(a, b));
    return 0;
}
main.cpp:
#include "aa.h"
int main(int argc, char **argv){
  int a = 1;
  int b = 2;
  AA* aa = new AA();
  aa->bar(a, b);
  delete(aa);
  return(0);
}
Makefile:
all:
        gcc -Wall -c a.c -o a.o
        gcc -Wall -c aa.cpp -o aa.o
        gcc -Wall -c main.cpp -o main.o
        g++ -o test *.o
¶þ. ͨ¹ý´¦Àíµ÷ÓõÄC++Îļþ
»Ö¸´a.hÎļþΪһ°ãÐÔCÍ·Îļþ,ÔÚaa.cppÎļþÖÐextern°üº¬a.hÍ·Îļþ»òº¯Êý.
a.h:
#ifndef __A_H
#define __A_H
int ThisIsTest(int a, int b);
#endif
aa.cpp:
extern "C"
{
    #include "a.h"
}
#include "aa.h"
#include "stdio.h"
int AA::bar(int a, int b){
    printf("result=%d\n", ThisIsTest(a, b));
    return 0;
}
or
aa.cpp:
#include "aa.h"
#include "stdio.h"
extern "C"
{
    int ThisIsTest(int a, int b);
}
int AA::bar(int a, int b){
    printf("result=%d\n", ThisIsTest(a, b));
    return 0;
}


Ïà¹ØÎĵµ£º

ÓÃCдµÄ3DÃÔ¹¬

          Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
       ´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸еģ¬»î»î»î£¡
         &n ......

ÈçºÎѧϰlinuxϵÄc/c++±à³Ì

ÎҼƻ®µÄѧϰÀú³Ì£º
1. cºÍc++µÄ»ù´¡ÖªÊ¶£¬Õâ¸öºÍ²Ù×÷ϵͳÎ޹أ¬ÔÚwindowsÉÏÒ²¿ÉÒÔѧ¡£cÓïÑÔÓï·¨Ïà¶Ô¼òµ¥Ò»µã£¬c++²»ÐèÒª°ÑËùÓеÄ֪ʶµã¶¼Ñ§»á£¬ÒªÖªµÀ»ù±¾µÄ·â×°£¬¼Ì³Ð£¬¶à̬֮ÀàµÄ£¬»¹ÓÐSTL¡£¸üÉîÈëµÄѧϰӦ¸ÃÊÇÔÚÒÔºóµÄ¹¤×÷ÖÐÓöµ½ÎÊÌâÁËÔÙÈ¥²é×ÊÁÏ¡£
2. ¿´Ê顶APUE¡·£¬×öÊéÉϵÄÏ°Ì⣬ÕÆÎÕÎļþ£¬ÏµÍ³µ÷Óã¬Ï̡߳¢½ø³Ì¡¢ ......

Android±àÒë»·¾³(1) ±àÒëNative CµÄhelloworldÄ£¿é

    Android±àÒë»·¾³±¾Éí±È½Ï¸´ÔÓ£¬ÇÒ²»ÏñÆÕͨµÄ±àÒë»·¾³£ºÖ»Óж¥²ãĿ¼Ï²ÅÓÐMakefileÎļþ£¬¶øÆäËûµÄÿ¸öcomponent¶¼Ê¹ÓÃͳһ±ê×¼µÄ
Android.mk.
Android.mkÎļþ±¾ÉíÊDZȽϼòµ¥µÄ£¬²»¹ýËü²¢²»ÊÇÎÒÃÇÊìϤµÄMakefile£¬¶øÊǾ­¹ýÁËAndroid×ÔÉí±àÒëϵͳµÄºÜ¶à´¦Àí£¬Òò´ËÒªÕæÕýÀíÇå
³þÆäÖеÄÁªÏµ»¹±È½Ï¸´ÔÓ£¬² ......

c ¶¯Ì¬Ìí¼Ó¿Ø¼þ

C#¶¯Ì¬´´½¨²Ëµ¥
 
Ò»¡¢¼ÓÈëËùÐèÊý¾Ý
1¡¢´´½¨Êý¾Ý±í£º
 
create table t_SysMenu(
FMenuName  varchar(50)    not null ,
FMenuText  varchar(50)    not null ,
FMenuEvent  varchar(100)  ,
FMenuShortcutKeys varchar(50) n ......

Facts of C Programming Language

Facts of C Programming Language
CµÄһЩÕƹÊ
(Ó¢ÎÄÔ­ÎÄ:http://www.programmingfacts.com/2009/12/01/facts-of-c-programming-language/)
C programming language was developed in 1972 by Dennis Ritchie and Brian Kernighan at the Bell Telephone Laboratories (AT&T Bell Laboratories) for use with the Un ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ