delphi ת bcb - C++ Builder / »ù´¡Àà
function ReadTime(intDevno: Integer; var strGet: Pchar): Integer; stdcall; external 'ast.dll'; //¶ÁÈ¡ÈÕÆÚʱ
bcbµ÷ÓÃdelphi µÄdllÕâ¾äÔÚbcbÖÐÈçºÎת»¯¡£
Ó¦¸ÃÊÇC/C++ code:
int __stdcall ReadTime(int intDevno, char *strGet);
C/C++ code:
void __fastcall TForm1::FormCreate(TObject *Sender)
{
int (__stdcall *ReadTime)(int intDevno,char strGet);
HINSTANCE hInst=::LoadLibrary( "ast.dll ");
if(!hInst)
{
ShowMessage( "Failed to load library ");
return;
}
else
{
ReadTime= (int(__stdcall*)(int intDevno,char strGet))GetProcAddress(hInst, "ReadTime ");
if(!ReadTime)
{
ShowMessage( "Failed to locate the function you specified ");
}
else
{
ReadTime(10,'a');
}
FreeLibrary(hInst);
}
}
Ïà¹ØÎÊ´ð£º
ÓÐÒ»10*10¾ØÕ󣬳ýÈ¥µÚÒ»¸öµã£¨0£¬0£©ºÍ×îºóÒ»µã£¨9£¬9£©£¬»¹Óа˸öµãΪ1£¬ÆäËû¶¼Îª0£¬ÒªÇóÓöþάÊý×é±íʾ¡£°Ë¸öµãÊÇËæ»úÉú³ÉµÄ£¬±àдÏà¹Ø³ÌÐò±íʾ¾ØÕóËùÓпÉÄÜÇé¿ö¡£
ÕæÐÄÇó½Ì¸÷λ¸ßÊÖ£¬°¥£¡±¾ÈËÌ«²ËÁË£¡ºÇºÇ£¡
......
´ó¼ÒºÃ£º
ÎÒÏëʵÏÖ¼ì²âµ½²åÈëSD¿¨ºó×Ô¶¯½«SD¿¨¸ñʽ»¯µÄ¹¦ÄÜ£¬²»ÖªC/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý£¿
ÁíÍ⣬ÎÒ²»ÏëʹÓÃSHFormatDrive£¬ÒòΪÕâ¸öº¯Êý»áµ¯³öÊÇ·ñÒª¸ñʽ»¯µÄÌáʾ¿ò£¬ÎÒÐèÒªµÄÊÇϵͳ×Ô¶¯¸ñʽ»¯£¬¶ø²Ù×÷Õß² ......
[align=center][/align]CÓïÑÔÖÐÈçºÎÅжÏÒ»¸ödoubleÐ͵ÄÊý×飨Èçdouble S[20]£»£©ÊÇÒ»¸ö¿ÕÊý×飬¼´Êý×éÖÐûÓзÅÈκÎÖµ¡£
û°ì·¨¡£
"ÈκÎÖµ" µÄ¶¨Òå?
¾ÍÊÇÊý×éÊǿյģ¬Ã»ÓÐΪËü¸³Öµ
¿ÉÒÔ¿¼Â ......
ÓÐÈý¸öÎļþ£¬w.h,w.cpp,m.cpp£¬ÆäÖÐm.cppÖÐÓÐmainº¯Êý£¬²¢ÇÒÐèÒª´«µÝÒ»¸öÎļþ²ÎÊý¡£
Çë½ÌÏ£¬ÈçºÎÔÚlinux»·¾³Ï±àÒëµ÷ÊÔ£¿
ÎÒ¶ÔlinuxϵıàÒ뼸ºõÍêÈ«²»¶®£¬¿É·ñÏêϸ½â´ðÏ£¬Ð»Ð»ÁË
up£¡£¡
up£¡£¡
g++
g ......
´ó¸ç´ó½ã£¬°ïÎÒÉèÖÃÒ»ÏÂÀïÃæµÄÖÐÎÄ×ÖÌ壬ҪÔÚͶӰÆÁÄ»ÉÏ¿´µÄÇå³þµÄ
#include<stdio.h>
#include<time.h>
#include<stdlib.h>
#include<conio.h>
main()
{
int a[30]={-200, ......