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

c/c++Àà³ÉÔ±º¯ÊýµÄ´«²ÎÎÊÌ⣡ÏêϸÎÊÌâÇó¸ßÊÖ½â´ð¡£¡£

#include <iostream>
#include <string>
using namespace std;
class Student
{
public:
void get_value()
{cin>>num>>name>>sex;}
void display()
{
cout < <"num:" < <num < <endl;
cout < <"name:" < <name < <endl;
cout < <"sex:" < <sex < <endl;
}
private:
int num;
string name;
char sex;
};
class Student1:public Student
{
public:
void display_1(int &age,string &addr)
{
cout < <" age:" < <age < <endl;
cout < <"address:" < <addr < <endl;
}
int age;
string addr;
};
int main()
{
Student1 stud;
stud.get_value();
stud.display();
stud.display_1(10,"haha");
return 0;
}

ÓÃVS2005±àÒë ±¨Õâ¸ö´íÎóStudent1::display_1¡±: ²»Äܽ«²ÎÊý 1 ´Ó¡°int¡±×ª»»Îª¡°int &¡±
ÇëÎÊ Èç¹ûÎÒ·ÇÒªstud.display_1(10,"haha");
void display_1(int &age,string &addr)
ÒªÔõôд£¿
ÄãÒª°ÑÒýÓÃÈ¥µô£¬Ð´³Édisplay_1(int, string );

ÒýÓÃ
ÄãÒª°ÑÒýÓÃÈ¥µô£¬Ð´³Édisplay_1(int, string );

±àÒëͨ¹ýÁË µ«ÊÇÖµ¸Ð¾õ»¹ÊÇû´«¹ýÈ¥°¡

4 str m


Ïà¹ØÎÊ´ð£º

CÈí¼þ תÕý¹¤×ʶàÉÙºÏÊÊ£¿

µØµãÔÚÉîÛÚÄÏɽ
¡¡¡¡×öCÈí¼þ¡£ÊÔÓÃ2K£¬²»ÖªµÀתÕý¸ø¹«Ë¾Ì¸¶àÉÙºÏÊʰ¡£¿
¡¡¡¡ÁíÍ⣬±¾ÈËС±¾£¬Ó¢ÓïÁù¼¶£¬ÊÔÓÃÈý¸öÔ±íÏÖµÃÒ²ËãÖÐÉÏˮƽ¡£µ«ÊÇÏÖÔÚ»¹²»ÄÜ×öÏîÄ¿¡£ÁíÍâ±ÏҵѧУûÓÐÃûÆø¡£
¡¡¡¡×ªÕý¸ø¹«Ë¾Ì¸¶àÉ ......

²ËÄñÇó½â:cͼÐÎÎÊÌâ

#include <stdio.h>
#include <graphics.h>
void main()
{
  int x0,y0,x1,y1,driver,mode,i;
  driver=VGA;
  mode=VGAHI;
  initgraph(&driver,&mode,&qu ......

ÄÜÓÃC/C++¼òµ¥ÊµÏÖÎå×ÓÆå³ÌÐòÂð?

×î½üͻȻÏë×Ô¼ºÀ´ÊµÏÖÒ»¸öÎå×ÓÆå³ÌÐò,µ«²»ÖªµÀÔõô¿ªÊ¼,×Ô¼ºÒ²Ã»Ñ§»­Í¼Ðκ¯Êý,ÄÜÔÚ¿ØÖÆÌ¨ÏÂÖ±½ÓдÂð>>>?????
¿ØÖÆÌ¨£¿±ÈͼÐνçÃæ¸üÂé·³¡£
http://search.download.csdn.net/search/%E4%BA%94%E5%AD%90% ......

Çó½âANSI/ISO CÖеÄÒ»¾ä»°

ANSI/ISO C ±ê×¼ÕâÑùÃèÊö:

ÔÚÉÏÒ»¸öºÍÏÂÒ»¸öÐòÁеãÖ®¼ä, Ò»¸ö¶ÔÏóËù±£´æµÄÖµÖÁ¶àÖ»Äܱ»±í

´ïʽµÄ¼ÆËãÐÞ¸ÄÒ»´Î¡£¶øÇÒǰһ¸öÖµÖ»ÄÜÓÃÓÚ¾ö¶¨½«Òª±£´æµÄÖµ¡£

ʵÔÚ²»Àí½âÕâ¾ä»°£¬Çë´ó¼ÒÒ»Æð˵˵£¿£¿ ......

C¡¢C++¡¢VC++ ¾«Æ·µç×ÓÊé·¢²¼À²£¡

ÄÚÈÝÉæ¼°£ºC¡¢C++¡¢STL¡¢VC++¡¢MFC¡¢COM¡¢ATL¡¢WindowsÍøÂç±à³Ì¡¢Êý¾Ý¿â±à³Ì¡¢WindowsÇý¶¯±à³Ì¡¢Èí¼þ¹¤³Ì¡¢Windows²Ù×÷ϵͳ±à³Ì£¬µÈµÈ·½Ãæ¡£

ÏÂÔØµØÖ·£ºhttp://www.cctry.com/forumdisplay.php?fid=46

......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ