cÎļþ²Ù×÷ÎÊÌâ
#include <stdio.h>
#define SIZE 10
struct student_type
{
char name[10];
int num;
int age;
char addr[15];
}stud[SIZE];
void save()
{
FILE *fp;
int i;
if((fp=fopen("stu_dat","wb"))==NULL)
{
printf("can't open the file\n");
return;
}
for(i=0;i <SIZE;i++)
{
if(fwrite(&stud[i],sizeof(struct student_type),1,fp)!=1)
printf("file write error\n");
}
fclose(fp);
}
void main()
{
int i;
printf("please enter data of student:");
for(i;i <SIZE;i++)
scanf("%s%d%d%s",stud[i].name,&stud[i].num,&stud[i].age,stud[i].addr);
save();
}
ÔËÐл·¾³ÊÇvc++6.0 ÎļþÃûÊÇ10_4.cpp
ÊäÈëÊý¾Ý²úÉú´íÎó
ÊäÈëµÄÊÇZhang 1001 19 room_101
»Ø³µµ¯³ö´íÎó
˵10_4.exeÓöµ½ÎÊÌâÐèÒª¹Ø±Õ
for(i;i <SIZE;i++) ,°ÑÕâÒ»¾äÈ¥µôÊÔÊÔ
ÎÒÄÇÊǸöÊý×é°¡£¬×¼±¸ÊäÈëÊ®×éÊý¾Ý°¡¡£²»ÄÜÈ¥µô
C/C++ code:
#include <stdio.h>
#define SIZE 10
Ïà¹ØÎÊ´ð£º
ÈçÌ⣬C/C++ÖеÄexeclÔõôµ÷ÓÃдºÃµÄjava³ÌÐò£¬
execl("/opt/java1.5/bin/java","MyClass",NULL);
ÕâÑùµÄ²»ÐÐŶ¡£
²»»á.
ÔËÐÐjava³ÌÐò
ÕÒ¹¤¾ß²é¿´Ò»ÏÂÄǸö³ÌÐòµÄÃüÁîÐÐ
ËÑË÷Ï£ºjni ......
ÈçºÎÓÃC»Í¼£¬ÄÜ·ñ±àÒ»¸ö¾ßÌåµÄ ¡£
#include <conio.h>
#include <stdio.h>
int main()
{
int i;
char *s[]={"BLACK","BLUE","GREEN","CYAN","RE ......
´ó¼ÒºÃ£¬ÕâÊÇÒ»¸öÖ÷ÒªÃæÏòc/c++/mfcµÄȺ£¬×î½ü½øÐÐÁËÒ»´Î´óÇåÀí£¬»¶Ó¸÷λ¸ßÊÖ¼ÓÈ룬ºÃѧ°®ÎʵÄÐÂÊÖ£¬Ò²¿ÉÒÔÉêÇëµÄ£¬ÉêÇë¸ñʽ Ö°Òµ£¨c/c++/mfc ÈÎѡһ»òÕ߶ࣩ ¹¤×÷ÄêÏÞ£¨Ñ§ÉúÖ±½Óд´ó¼¸£©¾ÍÐÐÁË£¬ÈëȺµÄÒªÇó¾ÍÊÇÒª» ......
°ï°ï棬лл~
1. Write a program to perform a topological sort on a graph.
2. Write a program to solve the single‐source shortest‐path problem (Dijkstra
algorithm).
3. Write a program ......
¸øÒÑ֪ͼÏñÌí¼Ó¸ß˹ÔëÉù£¬ÇëÎʸß˹ÔëÉùÊÇÔõôʵÏֵģ¿¾ùÖµ·½²î·Ö±ðΪu£¬v¡£
½²Ò»ÏÂ˼·ҲÐа¡¡£¡£¡£¡£¡£¡£
csdn ¸ßÊÖÔÆ¼¯µÄµØ·½¡£¡£¡£¡£¡£¡£
http://zhidao.baidu.com/question/71224083.html
2Â¥¸øµÄÊÇÒ»¸ ......