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

ÔÚAIX»úÆ÷ÉϵÄC³ÌÐò

¡¾checkpass.c¡¿
#include <stdio.h>
#include <string.h>
 
int checkpass(void){
   int x;
   char a[9];
   x = 0;
   fprintf(stderr,"a at %p and\nx at %p\n", (void *)a, (void *)&x);
   printf("Enter a short word: ");
   scanf("%s", a);
   if (strcmp(a, "mypass") == 0)
      x = 1;
   return x;
}
[make.c]
#include <stdio.h>
int checkpass(void);
int main(void)

 int x; 
 x = checkpass();
   fprintf(stderr, "x = %d\n", x);
   if (x) 
    fprintf(stderr, "Password is correct!\n"); 
 else 
    fprintf(stderr, "Password is not correct!\n");
  return 0;
}
[makefile]
LINT = lint         ##  lint check  Code
LOPS =  -x #-u
CC = cc #xlc  ## ×¢Ò⣺´óд'C' for c++
CC_FLAGS = #-q64 #-bnoquiet
INCLUDE= #-I.   -I/usr/include -I/usr/vacpp/include
LIBPATH=#-L/usr/vacpp/lib -L/usr/lib -L/lib
PROGRAM = run
ALL : $(PROGRAM)
.SUFFIXES: .cpp .c .cc .cxx .o
.DEFAULT : all
SRCS = main.c  checkpass.c
OBJS = $(SRCS:.c=.o)
 
$(PROGRAM) : $(OBJS)
  $(CC) $(CC_FLAGS) $(INCLUDE) $(LIBPATH) $(OBJS) -o $(PROGRAM)
.c.o:
 $(CC) $(INCLUDE) $(CC_FLAGS)   -c $<
lintall: lint
lint:
 $(LINT) $(LOPS) main.c checkpass.c
 
clean:
 - rm -f  ./*.o ./*.a ./$(PROGRAM)
[end]


Ïà¹ØÎĵµ£º

C¡¢C++ºÍC#µÄ²»Í¬Ö®´¦

CÊÇÃæÏò¹ý³ÌµÄ³ÌÐòÉè¼Æ£¬³ÌÐò=Êý¾Ý½á¹¹+Ëã·¨ [×îԭʼ£¬µ«±à¸ö³Ìȷʵ²»Ò×]
C++ÊÇÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼Æ£¬³ÌÐò=¶à¸öÀà+ÏûÏ¢(Àà=Êý¾Ý½á+Ëã·¨)[±È½ÏÈÝÒ×ÉÏÊÖ]
C# ÊÇ´¿ÃæÏò¶ÔÏóµÄÓïÑÔ[¸ü¼Ó±È½ÏÈÝÒ×ÉÏÊÖ]
VC/VC++/VC# Ö»ÊÇÓÃÀ´¿ª·¢C/C++/C#Ó¦ÓóÌÐòµÄÈí¼þÖеÄÒ»ÖÖ¡£
......

Éú²úÕß Ïû·ÑÕßÎÊÌâʵÏÖ (linuxÏÂCÓïÑÔ)

²Ù×÷ϵͳµÄÒ»¸ö¾­µäÎÊÌâÊÇ"Éú²úÕß-Ïû·ÑÕß"ÎÊÌâ, ÕâÉ漰ͬ²½ÐźÅÁ¿ºÍ»¥³âÐźÅÁ¿µÄÓ¦ÓÃ, ÔÚÕâÀï,ÎÒÓÃÏ̵߳Äͬ²½ºÍ»¥³âÀ´ÊµÏÖ.
/*
* author ÕÅÎÄ
* 2008/06/20
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h> ......

turbo C ϵĴò×ÖÓÎÏ·

ÔÚÕâÀïÌùÉÏ×î½ü×Ô¼ºÃ¦»îµÄÓÃturbo C±àдµÄ“´ò×ÖÓÎÏ·”µÄÔ´´úÂ룺
#include<graphics.h>
#include<conio.h>
#include<STDLIB.h>
#include<dos.h>
#define BK_COLOR BLACK
#define CHAR_COLOR WHITE
#define C_COLOR BLUE
#define num 10
#define SPEED 3000
#define Esc 27
# ......

keil C ³öÏÖWARNING:MULTIPLE CALL TO SEGMENTµÄ½âÎö

µ÷ÊÔkeil³ÌÐòʱÓÐʱ»á³öÏÖ¸÷ÖÖ±àÒ뾯¸æ£¬Ò»°ãÇé¿öϲ»»áÓ°Ïì³ÌÐòµÄÔËÐС£µ«³öÏÖÈçÌâWARNING:MULTIPLE CALL TO SEGMENT¾¯¸æʱ£¬ÇëÁôÒâÄúµÄ³ÌÐòÊÇ·ñ»á·¢Éú´íÎó¡£ÉÏÊö¾¯¸æÖ¸µÄÊÇÄ㶨ÒåµÄº¯ÊýÌåÔÚÖ÷³ÌÐòÖб»µ÷Óã¬ÔÚÖжÏÖÐÒ²±»Ö±½Ó»ò¼ä½ÓµÄµ÷ÓÃÁË¡£¿ÉÏëÈôÖ÷³ÌÐòÕýÔËÐд˺¯Êýʱ£¬ÖжÏÀ´ÁÙÒ²ÔËÐÐÕâ¶Î³ÌÐòµÄ»°»á·¢Éúº¯ÊýÖØÔØÏÖÏó¡£ ......

c/c++±ÊÊÔ


1£®½ø³ÌºÍÏ̵߳IJî±ð¡£
Ïß³ÌÊÇÖ¸½ø³ÌÄÚµÄÒ»¸öÖ´Ðе¥Ôª,Ò²Êǽø³ÌÄڵĿɵ÷¶ÈʵÌå.
Óë½ø³ÌµÄÇø±ð:
(1)µ÷¶È£ºÏß³Ì×÷Ϊµ÷¶ÈºÍ·ÖÅäµÄ»ù±¾µ¥Î»£¬½ø³Ì×÷ΪӵÓÐ×ÊÔ´µÄ»ù±¾µ¥Î»
(2)²¢·¢ÐÔ£º²»½ö½ø³ÌÖ®¼ä¿ÉÒÔ²¢·¢Ö´ÐУ¬Í¬Ò»¸ö½ø³ÌµÄ¶à¸öÏß³ÌÖ®¼äÒ²¿É²¢·¢Ö´ÐÐ
(3)ÓµÓÐ×ÊÔ´£º½ø³ÌÊÇÓµÓÐ×ÊÔ´µÄ¶ÀÁ¢µ¥Î»£¬Ï̲߳»ÓµÓÐϵͳ×ÊÔ´£¬µ«¿ÉÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ