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

CÎļþÖÐÒýÓÃCPPÎļþʱµÄÎÊÌâ


unzip.c
ÖÐÒýÓÃvalidate.cpp
ÎļþÖеĺ¯ÊýÀ´½øÐÐepub
¾À´í£¬²úÉúµÄÎÊÌ⣺
1.    
validate.cpp
ÖÐʹÓÃiostream.h,
µ«ÊÇC
ÖÐûÓÐÕâ¸öÎļþ
£¬ËùÒÔ²úÉúµÄ´íÎó£º
2>
ÕýÔÚ±àÒë...
2>unzip.c
2>D:\Program
Files\VC\include\cstdio(25) : error C2143:
Óï·¨´íÎó:
ȱÉÙ“{
”(
ÔÚ“:
”µÄÇ°Ãæ)
2>D:\Program
Files\VC\include\cstdio(25) : error C2059:
Óï·¨´íÎó:
“:

2>D:\Program
Files\VC\include\cstdio(25) : error C2143:
Óï·¨´íÎó:
ȱÉÙ“{
”(
ÔÚ“:
”µÄÇ°Ãæ)
2>D:\Program
Files\VC\include\cstdio(25) : error C2059:
Óï·¨´íÎó:
“:

¡£¡£¡£
2>D:\Program
Files\VC\include\cstdlib(21) : fatal error C1003:
´íÎó¼ÆÊý³¬¹ý100
£»ÕýÔÚÍ£Ö¹±àÒë
Ö»Òª½«iostream.h
»»³Éstdio.h
¼´¿É¡£µ«ÊÇÕâÑùÓÖ´øÀ´Ò»¸öÎÊÌ⣬validate.cpp
ÖÐÓõ½ÁËmemcpy
£¬Õâ¸öÊÇÔÚstring.h
ÖУ¬stdio.h
ÖÐûÓУ¬ËùÒÔÔÚvalidate.cpp
ÖÐ#include <string.h>
2.    
validate.cpp
ÖÐʹÓÃÁËÒýÓã¬C
ÖÐûÓÐÒýÓã¬ËùÒÔ½«ÒýÓøÄΪָÕë¼´
¿É¡£´íÎóÌáʾ£º
missing “(“ before &,
Ìáʾ&
µÄÎÊÌâ
3.    
¸ÄºÃºóеĴíÎó£º
>unzip.c
2>e:\Hanvon_DRMSDK_1_0_0\DRMSDK\source\Validate.h(46)
: error C2061:
Óï·¨´íÎó:
±êʶ·û“ReadEndOfCenDirRecord

2>e:\Hanvon_DRMSDK_1_0_0\DRMSDK\source\Validate.h(46)
: error C2059:
Óï·¨´íÎó:
“;

2>e:\Hanvon_DRMSDK_1_0_0\DRMSDK\source\Validate.h(46)
: error C2059:
Óï·¨´íÎó:
“ÀàÐÍ”
   
Õâ¸ö´íÎóʱÓÉÓÚº¯ÊýÉùÃ÷
bool
ReadEndOfCenDirRecord
(FILE
*
m_fp
, EndCentralDirectoryRecord
*
m_endCenDirRecord
);
   
¶øC
ÖÐÊÇûÓÐbool
Ð͵Ä
£¬ËùÒԸijÉint
ÐÍ£¬ÏàÓ¦µÄ³ÌÐòÄÚ²¿return
Öµ×öÐ޸ġ£
4.    
±àÒëºÃ»¹ÊÇÓдíÎó£º
2>unzip.c
2>e:\Hanvon_DRMSDK_1_0_0\DRMSDK\source\Validate.h(46)
: error C2143:
Óï·¨´íÎó:
ȱÉÙ“)
”(
ÔÚ“*
”µÄÇ°Ãæ)
2>e:\Hanvon_DRMSDK_1_0_0\DRMSDK\sou


Ïà¹ØÎĵµ£º

Á´±íµÄ»ù±¾²Ù×÷(cʵÏÖ£©

  
Á´±í¶¨Òå¼°²Ù×÷µÄÔ´Îļþ£ºemployee.h
//
#pragma once
#ifndef __EMPLOYEE_H__
#define __EMPLOYEE_H__
#include<stdio.h>
#include<malloc.h>
typedef struct employee{
int id;
int age;
int salary;
}EmpType;
typedef struct Node{
EmpType data;
struct Node *next;
}L ......

¹ØÓÚcÖÐvolatile¹Ø¼ü×Ö£¨×ªÌù£©

 Ò»¸ö¶¨ÒåΪvolatileµÄ±äÁ¿ÊÇ˵Õâ±äÁ¿¿ÉÄܻᱻÒâÏë²»µ½µØ¸Ä±ä£¬ÕâÑù£¬±àÒëÆ÷¾Í²»»áÈ¥¼ÙÉèÕâ¸ö±äÁ¿µÄÖµÁË¡£¾«È·µØ˵¾ÍÊÇ£¬ÓÅ»¯Æ÷ÔÚÓõ½Õâ¸ö±äÁ¿Ê±±ØÐëÿ´Î¶¼Ð¡ÐĵØÖØжÁÈ¡Õâ¸ö±äÁ¿µÄÖµ£¬¶ø²»ÊÇʹÓñ£´æÔڼĴæÆ÷ÀïµÄ±¸·Ý¡£ÏÂÃæÊÇvolatile±äÁ¿µÄ¼¸¸öÀý×Ó£º
    1). ²¢ÐÐÉ豸µÄÓ²¼þ¼Ä´æÆ÷£¨È磺״̬¼Ä´æÆ ......

C++ÖÐextern ¡°C¡±º¬ÒåÉî²ã̽Ë÷

(ת)C++ÖÐextern “C”º¬ÒåÉî²ã̽Ë÷
 
 
1.ÒýÑÔ
¡¡¡¡C++ÓïÑԵĴ´½¨³õÖÔÊÇ“a better C”£¬µ«ÊÇÕâ²¢²»Òâζ×ÅC++ÖÐÀàËÆCÓïÑÔµÄÈ«¾Ö±äÁ¿ºÍº¯ÊýËù²ÉÓõıàÒëºÍÁ¬½Ó·½Ê½ÓëCÓïÑÔÍêÈ«Ïàͬ¡£×÷ΪһÖÖÓûÓëC¼æÈݵÄÓïÑÔ£¬C++±£ÁôÁËÒ»²¿·Ö¹ý³ÌʽÓïÑÔµÄÌص㣨±»ÊÀÈ˳ÆΪ“²»³¹µ×µØÃæÏò¶ÔÏó&rdquo ......

extern "C"Ïê½â

 Ê±³£ÔÚcppµÄ´úÂëÖ®Öп´µ½ÕâÑùµÄ´úÂë: 
#ifdef __cplusplus 
extern "C" { 
#endif 
//Ò»¶Î´úÂë 
#ifdef __cplusplus 

#endif 
¡¡¡¡ÕâÑùµÄ´úÂëµ½µ×ÊÇʲôÒâ˼ÄØ£¿Ê×ÏÈ£¬__cplusplusÊÇcppÖеÄ×Ô¶¨Òåºê£¬ÄÇô¶¨ÒåÁËÕâ¸öºêµÄ»°±íʾÕâÊÇÒ ......

C/C++——С±à̸CÓïÑÔº¯ÊýÄÇЩÊÂ(11)

C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
 
1. kbhitº¯Êý
 
kbhitº¯ÊýÊǼì²éµ±Ç°°´Ïµļü£¬ÆäÓ÷¨Îª£ºint kbhit(void);³ÌÐòÀý×ÓÈçÏ£º
#include <conio.h>
int main(void)
{
   c ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ