C++ÓëCµÄÇø±ð
±±º£
1£© º¯ÊýÉùÃ÷
l CÈç¹û²»Ð´·µ»ØÖµ£¬Ä¬ÈÏÊÇint£¬¶øC++Öв»Äܲ»Ð´·µ»ØÖµ(¿ÉÓÃvoid±íʾÎÞ·µ»ØÖµ)¡£
ÈçFunc1();
l int Func1()ÔÚCÖбíʾ¿É´øÈÎÒâ²ÎÊýµÄº¯Êý£¬ÕâÊÇCµÄ©¶´£¬Ê¹µÃËü±Ü¿ªÁ˲ÎÊýÀàÐͼì²é£»¶øC++Öбíʾ²»´ø²ÎÊýµÄº¯Êý¡£
2£© Í·ÎļþµÄÇø±ð
l C++µÄÍ·ÎļþÈ¥µôÁËCÖеÄ.h£¬ÒÔcǰ׺¿ªÊ¼¡£±ÈÈ磬<stdio.h> <stdlib.h>±äΪ<cstdio> <cstdlib>
l C´ø.hµÄÊÇ·ÇÄ£°å»¯µÄÍ·Îļþ£¬¶øC++ÊÇÄ£°å»¯µÄÍ·Îļþ¡£
.hÎļþÊDz»º¬ÃüÃû¿Õ¼äµÄ£¬ËùÒÔÒÔÇ°µÄ<iostream.h>ÊDz»ÐèÒªusingµÄ¡£
µ±È»Ò²¿ÉÒÔÓÃÀϵÄCÍ·Îļþ£¬µ«ÊÇ£¬ÔÚͬһ¸ö³ÌÐòÀï²»ÄÜ»ì×ÅÓã¬ËäÈ»±àÒë¿ÉÒÔͨ¹ý£¬µ«ÊÇ¿ÉÄÜ»á³öÏÖÎÊÌâ¡£
3£© register±äÁ¿
ÔÚCÓïÑÔÖУ¬ÊDz»ÄܶÔregister±äÁ¿È¡µØÖ·µÄ£¬ÒòΪËüûÓÐÐéµØÖ·£¬ÔڼĴæÆ÷Àï¡£¶øC++ÖУ¬ËüÊÇ¿ÉÒÔÈ¡Ö·µÄ£¬Õâʱ£¬C++±àÒëÆ÷»áºöÂÔregister£¬²»»á°ÑËü·Åµ½¼Ä´æÆ÷Àï¡£
4£© const±äÁ¿
CÖУ¬constÊÇÖ»¶ÁµÄ±äÁ¿£¬²»Êdz£Á¿£»C++ÖÐËüÊdz£Á¿¡£Çø±ðÓÃÀý×ÓÃèÊöÈçÏ£º
const int MAX = 10;
char buffer[MAX]; //CÖÐËüÊDz»ºÏ·¨µÄ£¬¿ÉÒÔÓÃenum»òdefineÌæ´ú£»
//C++ÖÐËüÊǺϷ¨µÄ¡£
±¾ÖÊ£ºCÖÐconst±äÁ¿·ÖÅäÔÚÈ«¾Ö¾²Ì¬Çø£»C++ÖÐÔòÔÚ³£Á¿Çø£¬±àÒë¹ý³ÌÖÐÖµ¾Í¶¨ÁË¡£
5£© typedef
ÔÚCÖУ¬
struct A
{
};
A a; //ÕâÊÇ´íÎóµÄ£¬ÔÚC++ÖÐÊǺϷ¨µÄ¡£
struct A a; //ÕâÊÇÕýÈ·µÄ
ÓÃÁËtypedefºó£¬CÖÐA a;Ò²ÊǺϷ¨µÄÁË¡£
6£© struct/union/class
l ¶ÔÓÚstruct/unionÊý¾Ý³ÉÔ±Ó뺯Êý³ÉÔ±µÄ·ÃÎÊÐÔÀ´Ëµ£¬ÆäĬÈÏÊÇpublic£»
l classÔòÊÇprivate¡£
l unionÁªºÏÌå²»ÄÜ×÷Ϊ»ùÀà¼Ì³Ð¡£
union A
{
};
class B: public A //±àÒë³ö´í
{
};
l ÄäÃûunion
union
{
int a;
float b;
};
ÔÚ³ÌÐòÀï¿ÉÒÔÖ±½Ó·ÃÎÊ
Ïà¹ØÎĵµ£º
/*
* File: main.cpp
* Author: Vicky
*
* Created on 2010Äê5ÔÂ8ÈÕ, ÏÂÎç2:47
*/
#include <iostream>
using namespace std;
class A{
public:
A(){
cout << "Ö´Ðй¹Ô캯Êý´´½¨Ò»¸ö¶ÔÏó" << endl;
}
A(A&){
cout << "Ö´Ðп½±´º¯Êý¿½±´Ò»¸ö¶ ......
1¡¢http://snippets.dzone.com/tag/c/ --ÊýÒÔǧ¼ÆµÄÓÐÓõÄCÓïÑÔÔ´´úÂëƬ¶Î
2¡¢http://www.hotscripts.com/category/c-cpp/scripts-programs/ Hotscripts --ÌṩÊýÒ԰ټƵÄCºÍC++½Å±¾ºÍ³ÌÐò¡£ËùÓгÌÐò¶¼·ÖΪ²»Í¬µÄÀà±ð¡£
3¡¢http://www.planetsourcecode.com/vb/default.asp?lngWId=3 --³¬¹ýÍòÐÐCºÍC++Ãâ·ÑµÄÔ´´úÂë
4¡ ......
Àý) Σ険¤Ê¥³ー¥Ç¥£¥ó¥°
1 char cStr[256];
2 ZeroMemory(cStr, sizeof(cStr));
3 &nb ......
oracleÖÐpro*cµÄѧϰ
¡¡Ò» Pro*C ³ÌÐò¸ÅÊö£º
1£®Ê²Ã´ÊÇPro*C³ÌÐò
ÔÚORACLEÊý¾Ý¿â¹ÜÀíºÍϵͳÖУ¬ ÓÐÈýÖÖ·ÃÎÊÊý¾Ý¿âµÄ·½·¨£»
£¨1£© ÓÃSQL*Plus£¬ ËüÓÐSQLÃüÁîÒÔ½»»¥µÄÓ¦ÓóÌÐò·ÃÎÊÊý¾Ý¿â£»
£¨2£© ÓõÚËÄ´úÓïÑÔÓ¦Óÿª·¢¹¤¾ß¿ª·¢µÄÓ¦ÓóÌÐò·ÃÎÊÊý¾Ý¿â£¬ÕâЩ¹¤¾ßÓÐSQL*froms£¬QL*Reportwriter,SQL*MenuµÈ£»
£¨3£© ÀûÓÃÔÚ ......