¹ØÓÚÏßÐÔ±íµÄC³ÌÐò£¬Óï·¨ÎÊÌ⣿²»»á°É
´íÎó¾ÍÏÂÃæÈýÐУ¬£¨¿´µ½µÄ°ïÎÒ¿´¿´ÊÇÄÄÀïµÄÎÊÌâ°¡£©
\MSDev98\MyProjects\example\ex.c(117) : error C2449: found '{' at file scope (missing function header?)
F:\MSDev98\MyProjects\example\ex.c(120) : error C2059: syntax error : '}'
F:\MSDev98\MyProjects\example\ex.c(122) : error C2059: syntax error : '}'
Ö´ÐÐ cl.exe ʱ³ö´í.
/*10.3.2Ô´³ÌÐò*/
/******Í·Îļþ£¨.h£©***********/
#include <windows.h>
#include <conio.h>
#include "stdio.h" /*I/Oº¯Êý*/
#include "stdlib.h" /*±ê×¼¿âº¯Êý*/
#include "string.h"/*×Ö·û´®º¯Êý*/
#include "ctype.h" /*×Ö·û²Ù×÷º¯Êý*/
#define M 50 /*¶¨Òå³£Êý±íʾ¼Ç¼Êý*/
typedef struct /*¶¨ÒåÊý¾Ý½á¹¹*/
{
char name[20]; /*ÐÕÃû*/
char units[30]; /*µ¥Î»*/
char tele[10]; /*µç»°*/
}ADDRESS;
/******ÒÔÏÂÊǺ¯ÊýÔÐÍ*******/
void gotoxy(int a,int b);
int enter(ADDRESS t[]); /*ÊäÈë¼Ç¼*/
void list(ADDRESS t[],int n); /*ÏÔʾ¼Ç¼*/
void search(ADDRESS t[],int n); /*°´ÐÕÃû²éÕÒÏÔʾ¼Ç¼*/
int Delete(ADDRESS t[],int n); /*ɾ³ý¼Ç¼*/
int add(ADDRESS t[],int n); /*²åÈë¼Ç¼*/
void save(ADDRESS t[],int n); /*¼Ç¼±£´æΪÎļþ*/
int load(ADDRESS t[]); /*´ÓÎļþÖжÁ¼Ç¼*/
void display(ADDRESS t[]); /*°´ÐòºÅ²éÕÒÏÔʾ¼Ç¼*/
void sort(ADDRESS t[],int n); /*°´ÐÕÃûÅÅÐò*/
void qseek(ADDRESS t[],int n); /*¿ìËÙ²éÕҼǼ*/
void copy(); /*Îļþ¸´ÖÆ*/
void print(ADDRESS temp); /*ÏÔʾµ¥Ìõ¼Ç¼*/
int find(ADDRESS t[],int n,char *s) ; /*²éÕÒº¯Êý*/
int menu_select(); /*Ö÷²Ëµ¥º¯Êý*/
/******Ö÷º¯Êý¿ªÊ¼*******/
main()
{
ADDRESS adr[M]; /*¶¨Òå½á¹¹ÌåÊý×é*/
int length; /*±£´æ¼Ç¼³¤¶È*/
system("clr"); /*ÇåÆÁ*/
for(;;)/*ÎÞÏÞÑ»·*/
{
switch(menu_select()) /*µ÷ÓÃÖ÷²Ëµ¥º¯Êý£¬·µ»ØÖµÕûÊý×÷¿ª¹ØÓï¾äµÄÌõ¼þ*/
{
case 0:length=enter(adr);break;/*ÊäÈë¼Ç¼*/
case 1:list(adr,length);break; /*ÏÔʾȫ²¿¼Ç¼*/
Ïà¹ØÎĵµ£º
ÒòΪÏîÄ¿ÒªÇó£¬ÖÆ×÷µÄÒ»¸ö¶àÎļþÉÏ´«£¬²¢ÏÔʾ½ø¶ÈÌõÒ»¶Î´úÂë(vs2005»·¾³)¡£
(ֻΪ´ÖÂÔµÄʵÏÖ£¬´úÂë²¢²»¹æ·¶)
µ±¶à¸öÎļþÉÏ´«µÄʱºò£¬ÐèÒªÒÀ´Î¶ÓÁÐÐÎʽһ¸ö¸öÉÏ´«£¬µ±ÉÏ´«Ä³¸öÎļþµÄʱºò£¬Ëø¶¨½ø³Ì£¬ÉÏ´«Íê±ÏÔÙ¿ªÆôËø¡£
ÔÚÖ÷ÀàÖеÄÉÏ´«°´Å¥Ê¼þ´úÂë:
//
»ñÈ¡openFileDialog¿Ø¼þÑ¡ÔñµÄÎļþÃûÊý×é(openFileDialog¿É ......
ʵÑéÒªÇó£º
1.±àд»ùÓÚTCPÐÒéµÄͨÐųÌÐò£¬°üÀ¨ServerÓëClientÁ½¸ö²¿·Ö¡£ÊµÏÖ»ØÉù³ÌÐò£º¼´¿Í»§¶Ë·¢ËÍÏûÏ¢£¬·þÎñÆ÷¶Ë½«ÊÕµ½µÄÏûÏ¢ÔÑù»áË͸ø¿Í»§¶Ë¡£
2.ÔÚµ¥»úÉÏÔËÐÐËüÃÇ£¬ÑéÖ¤ÆäͨÐŽá¹û£»
3.ÔÚ¶à»úÉÏÔËÐÐËüÃÇ£¬ÑéÖ¤ÆäͨÐŽá¹û£»£¨ChatServerÖ»ÐèÔËÐÐÔÚһ̨Ö÷»úÉÏ£¬ChatClient¿ÉÔÚÆäËüÖ÷»úÉÏÔËÐУ¨ÒªÖªµÀChatServerËùÔ ......
#include<stdio.h>
int cubeByValue(int n);
int main(){
int number = 5 ;
printf("The original value of number is %d\n",number);
number = cubeByValue(number);
printf("The new  ......
ÔÚCÖпÉÒÔ¶¨ÒåÈ«¾Ö±äÁ¿£¬È«¾Ö±äÁ¿ÊÇÔÚ³ÌÐò¼ÓÔسõʼ»¯Ê±·ÖÅä¿Õ¼ä²¢½øÐгõʼ»¯¡£ÔÚc´úÂëÖж¨Òå/ÉùÃ÷È«¾Ö±äÁ¿µÄ·½Ê½ÈçÏÂ
1. int n;
¶¨Òå»òÕßÉùÃ÷£¨Èç¹ûÔÚÆäËûÎļþÖÐÒѶ¨Ò壩ȫ¾Ö±äÁ¿¡£
2. int n = 10;
¶¨ÒåÈ«¾Ö±äÁ¿²¢³õʼ»¯¡£
3. extern int n;
ÉùÃ÷ÔÚÍⲿ¶¨Ò ......