#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 );
±àÒëͨ¹ýÁË µ«ÊÇÖµ¸Ð¾õ»¹ÊÇû´«¹ýÈ¥°¡
4 str m
Ïà¹ØÎÊ´ð£º
µØµãÔÚÉîÛÚÄÏɽ
¡¡¡¡×öCÈí¼þ¡£ÊÔÓÃ2K£¬²»ÖªµÀתÕý¸ø¹«Ë¾Ì¸¶àÉÙºÏÊʰ¡£¿
¡¡¡¡ÁíÍ⣬±¾ÈËС±¾£¬Ó¢ÓïÁù¼¶£¬ÊÔÓÃÈý¸öÔ±íÏÖµÃÒ²ËãÖÐÉÏˮƽ¡£µ«ÊÇÏÖÔÚ»¹²»ÄÜ×öÏîÄ¿¡£ÁíÍâ±ÏҵѧУûÓÐÃûÆø¡£
¡¡¡¡×ªÕý¸ø¹«Ë¾Ì¸¶àÉ ......
#include <stdio.h>
#include <graphics.h>
void main()
{
int x0,y0,x1,y1,driver,mode,i;
driver=VGA;
mode=VGAHI;
initgraph(&driver,&mode,&qu ......
×î½üͻȻÏë×Ô¼ºÀ´ÊµÏÖÒ»¸öÎå×ÓÆå³ÌÐò,µ«²»ÖªµÀÔõô¿ªÊ¼,×Ô¼ºÒ²Ã»Ñ§»Í¼Ðκ¯Êý,ÄÜÔÚ¿ØÖÆÌ¨ÏÂÖ±½ÓдÂð>>>?????
¿ØÖÆÌ¨£¿±ÈͼÐνçÃæ¸üÂé·³¡£
http://search.download.csdn.net/search/%E4%BA%94%E5%AD%90% ......
ANSI/ISO C ±ê×¼ÕâÑùÃèÊö:
ÔÚÉÏÒ»¸öºÍÏÂÒ»¸öÐòÁеãÖ®¼ä, Ò»¸ö¶ÔÏóËù±£´æµÄÖµÖÁ¶àÖ»Äܱ»±í
´ïʽµÄ¼ÆËãÐÞ¸ÄÒ»´Î¡£¶øÇÒǰһ¸öÖµÖ»ÄÜÓÃÓÚ¾ö¶¨½«Òª±£´æµÄÖµ¡£
ʵÔÚ²»Àí½âÕâ¾ä»°£¬Çë´ó¼ÒÒ»Æð˵˵£¿£¿ ......
ÄÚÈÝÉæ¼°£ºC¡¢C++¡¢STL¡¢VC++¡¢MFC¡¢COM¡¢ATL¡¢WindowsÍøÂç±à³Ì¡¢Êý¾Ý¿â±à³Ì¡¢WindowsÇý¶¯±à³Ì¡¢Èí¼þ¹¤³Ì¡¢Windows²Ù×÷ϵͳ±à³Ì£¬µÈµÈ·½Ãæ¡£
ÏÂÔØµØÖ·£ºhttp://www.cctry.com/forumdisplay.php?fid=46
......