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

C/C++ÓëJavaº¯ÊýÖØÔØÇø±ð!

#include <iostream>
using namespace std;
class Base {
public:
virtual void fn(int x) {
cout << "In Base class, int x = " << x << endl;
}
};
class SubClass : public Base {
public:
// º¯ÊýµÄÖØÔØ,ÕâÑùµÄÖØÔØ·½Ê½,ÔÚJavaÖÐÄÜÐÐ,ÔÚC/C++ÖÐÈ´²»ÐÐ
virtual void fn(float x) {
cout << "In SubClass, float x = " << x << endl;
}
};
void test(Base& b) {
int i = 1;
b.fn(i);
float f = 2.0;
b.fn(f);
}
int main() {
Base bc;
SubClass sc;
cout << "Calling test(bc)\n";
test(bc);
cout << "Calling test(sc)\n";
test(sc);
return 0;
}
Calling test(bc)
In Base class, int x = 1
In Base class, int x = 2
Calling test(sc)
In Base class, int x = 1
In Base class, int x = 2
ÔËÐгɹ¦£¨×ܼÆʱ¼ä£º 312ºÁÃ룩
×¢Òâ,¶¼Êǵ÷Óõĸ¸ÀàÖеĺ¯Êý.
package cn.vicky;
public class MyTest {
public void add(int i) {
System.out.println("in parent");
}

public static void main(String[] args) {
MyTest2 m2 = new MyTest2();
m2.add(1);
m2.add(1.1);
}
}
class MyTest2 extends MyTest {
public void add(double i) {
System.out.println("in child");
}
}
  
in parent
in child
JavaÈ´¿ÉÒÔÇø·Ö...


Ïà¹ØÎĵµ£º

C#µ½Java byteÀàÐͳåÍ»µÄ½â¾ö

×î½üÒª¸Äдһ¸öºËÐļÓÃÜÈÏÖ¤À࣬´ÓC#¸Äд³ÉJava¡£
·¢ÏÖÔÚµ÷ÊÔʱ£¬¼ÓÃܵÄÊý¾ÝÎÞÂÛÈçºÎÒ²¶Ô²»ÉÏ¡£
¾­¹ý¸ú×Ù£¬·¢ÏÖÎÊÌâ³öÔÚC#ºÍJava byteÀàÐ͵ÄÇø±ðÉÏ£ºÔÚC#Àï byteÀàÐÍÊÇÎÞ·ûºÅµÄ£¬¶øJavaÀïÊÇÓзûºÅµÄ£¬ËùÒÔC#ÀïµÄ129µ½JavaÀï¾Í³ÉÁ˸ºÊý¡£
·¢ÏÖÁËÎÊÌ⣬½â¾ö¾Í±È½ÏÈÝÒ×ÁË£¬Õë¶ÔJavaµÄbyte£¬²ÉÓÃIntÀ´½øÐд洢¡£
ͨ¹ýÈçÏ´ú ......

java¶ÁÈ¡xmlÅäÖÃÎļþ

xmlÎļþÈçÏ ÅäÖù¦ÄÜ¿ª¹Ø
<Configurations>
    <Samples>true</Samples>
    <Excepts>true</Excepts>
    <CheckFace>false</CheckFace>
    <ThumbNail>false</ThumbNail>
  &nbs ......

д¸øc/c++µÄÐÂͬÐÐÃÅ

Ô½½çÊÇ×îÄѲéµÄ£¬×¢Òâmemcpy strcpy,strncpyÕâЩº¯ÊýʹÓÃÇ°Ò»¶¨Òª¼ì²é±ß½ç
¡¡ÌرðÊÇÄãÌṩº¯Êý¸ø±ðÈËÓÃʱ£¬ÄãµÄº¯ÊýÖÐÓõ½ÁËÕâЩ¶«Î÷£¬Ò»¶¨Òª¼ì²é±ðÈË´«¸øÄãµÄÖ¸ÕëµÄ
¡¡±ß½ç
2¡¢±äÁ¿³õʼ»¯
¡¡ÕâÖÖÎÊÌâÒªÑø³ÉºÃÏ°¹ß£¬·ñÔò³öÀ´Å¼È»ÐÔÎÊÌ⣬·Ç³£ÄѲé
3¡¢¶àÏß³ÌÖ¸Õë¹ÜÀí
¡¡ÔÚ¶àÏ̻߳·¾³ÏÂʹÓÃÖ¸Õëʱ£¬×îºÃ²ÉÓÃÒýÓü ......

C ÑÕÉ«±ÈÕÕ±í


---------------------------------------------------
Ãû          µÈ¼ÛÖµ           º¬ Òå
BLACK             0           ºÚ
BLUE               1     ......

C setlinestyle()


 ÏßÐÍ
-----------------------------------------------------
Ãû        ³Æ      È¡ Öµ         º¬    Òå
-----------------------------------------------------
SOLID_LINE          0       & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ