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

CÖжÁÈ¡Êý×é

#include <stdio.h>
#include <stdlib.h>
#define MAXSIZE 100
main()
{
FILE *fp;
if ( (fp = fopen( "c:\\a.txt", "r" )) == NULL ) printf("ERROR!\n");
int tmp[MAXSIZE];
int i;
for ( i=0; i<MAXSIZE; i++ )
{
tmp[i] = 0;
}
char chtmp[10000];
i=0;
while ( !feof(fp) && i!=MAXSIZE )
{
fscanf( fp, "%d ", &tmp[i] );
//printf("tmp[%d]=%d",i,tmp[i]);
i++;
}
for ( i=0; i<MAXSIZE; i++ )
{
printf( "tmp[%3d]=%d\n", i, tmp[i] );
}
fclose( fp );
system("PAUSE");
}
TXTÎļþÐèÒª·ÅÔÚcÅ̸ùĿ¼
[][][][][]TXTÎļþÄÚÈÝÈçÏ£º
1234 5 6 6 6 7 8 8 8356 8 3568 35 8 136 1 8 07 86 89765 7895 765 786 4 654 654 8 790 870 987 0987 87 69 8756 765 87 65 8765 84 3 54 3 458 76 0987 -908 -908 -709 0986 98 76 06 985 7 4 423 6542 6543


Ïà¹ØÎĵµ£º

¡¾×ª¡¿CÓëC++µÄÇø±ð

Ôںܴó³Ì¶ÈÉÏ,±ê×¼C++ÊDZê×¼CµÄ³¬¼¯.ʵ¼ÊÉÏ,ËùÓÐC³ÌÐòÒ²ÊÇC++³ÌÐò,È»¶ø,Á½ÕßÖ®¼äÓÐÉÙÁ¿Çø±ð.ÏÂÃæ¼òÒª½éÉÜÒ»ÏÂ×îÖØÒªµÄÇø±ð.
    ÔÚC++ÖÐ,Ãñ,¾Ö²¿±äÁ¿¿ÉÒÔÔÚÒ»¸ö³ÌÐò¿éÄÚÔÚÈκεط½ÉùÃ÷,ÔÚCÖÐ,¾Ö²¿±äÁ¿±ØÐëÔÚ³ÌÐò¿éµÄ¿ªÊ¼²¿·Ö,¼´ÔÚËùÓÐ"²Ù×÷"Óï¾ä֮ǰÉùÃ÷,Çë×¢Òâ,C99±ê×¼ÖÐÈ¡ÏûÁËÕâÖÖÏÞÖÆ.
  &nb ......

C/C++ Í·Îļþ ³£ÓÃÍ·Îļþ¹¦Äܲéѯ±í

#include <assert.h>¡¡¡¡¡¡¡¡//É趨²åÈëµã
#include <ctype.h>¡¡¡¡¡¡¡¡ //×Ö·û´¦Àí
#include <errno.h>¡¡¡¡¡¡¡¡ //¶¨Òå´íÎóÂë
#include <float.h>¡¡¡¡¡¡¡¡ //¸¡µãÊý´¦Àí
#include <fstream.h>¡¡¡¡¡¡ //ÎļþÊäÈ룯Êä³ö
#include  ......

extern "C"

CºÍC++»¥Ïàµ÷Óú¯Êýʱ£¬Ê¹ÓÃextern "C"¡£
Ô­Òò£º
C²»Ö§³Öº¯ÊýÖØÔØ£¬¶øC++Ö§³Öº¯ÊýÖØÔØ¡£º¯Êý±»C++±àÒëºó»áÃû×ÖÓëCÓïÑÔ²»Í¬¡£¼ÙÉèijº¯ÊýÔ­ÐÍΪfoo(ing x, int y)£¬±»C++±àÒëºóÃû×ÖΪ_foo_int_int£¬¶øC±àÒëÆ÷±àÒëºóÃû×ÖΪ_foo¡£ ......

×îСÉú³ÉÊ÷µÄKruskalËã·¨(C/C++) ¸½ÓвâÊÔÊý¾ÝºÍ½á¹û

/*
*Ëã·¨Ô­Àí£º½«Í¼G Öеı߰´È¨Êý´ÓСµ½´óÖðÌõ¿¼²ì,
* °´²»¹¹³ÉȦµÄÔ­Ôò¼ÓÈëµ½TÖÐ(ÈôÓÐÑ¡Ôñʱ, ²»Í¬µÄÑ¡
* Ôñ¿ÉÄܻᵼÖÂ×îºóÉú³ÉÊ÷µÄȨÊý²»Í¬), Ö±µ½
* q(T) = p(G)-1Ϊֹ, ¼´ T µÄ±ßÊý = G µÄ¶¥µã1 Ϊֹ.
*Ëã·¨ÖÐÎÞȦÐÔµÄÅж¨±È½ÏÂé·³£¬Ó¦¸ÃÓñê¼Ç·¨×îºÃ£¬
*¶Ô¸÷¸ö·ÖÖ§µÄ¶¥µã±êºÅ¡£
*ÎÒû×Ðϸ¿ ......

ÓÃC££¡¢JAVAÒ»´ÎÐÔÈ¡³ö´æ´¢¹ý³ÌÖеĸ÷ÖÖ·µ»ØÖµ

ÎÊÌ⣺ÔÚ´æ´¢¹ý³ÌÖУ¬ÓÐʱ»áÓöµ½±È½Ï±ä̬µÄ¶«Î÷£¬ÈçÒ»¸ö´æ´¢¹ý³ÌÖÐÓÐoutput·µ»ØÖµ£¬ÓÐreturn·µ»ØÖµ£¬»¹ÓвéѯµÄ·µ»ØÖµTABLE£¬Óöµ½ÕâÑùµÄ´æ´¢¹ý³ÌÕæÊÇÓôÃÆ£¬Ò»´ÎÐÔ°ÑËùÓеķµ»ØÖµÈ¡³öÀ´»¹ÕæµÄÓеãÂé·³¡£
 
 
1¡¢  Ê×ÏÈÀ´¿´Õâ¸ö´æ´¢¹ý³Ì°É
 
CREATE  PROCEDURE ParaTest
@paraout varchar(20) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ