FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
January 01, 2006

Ch: A C/C++ Interpreter for Script Computing

(Page 4 of 10)

January, 2006: Ch: A C/C++ Interpreter for Script Computing

Example 3: Some C++ features are supported in Ch for interactive execution of C++ code.

> int i 
> cin >> i 
10 
> cout << i 
10 
> class tagc {private: int m_i; public: void set(int); int get(int &);} 
> void tagc::set(int i) {m_i = 2*i;} 
> int tagc::get(int &i) {i++; return m_i;} 
> tagc c 
> c.set(20) 
> c.get(i) 
40 
> i 
11 
> sizeof(tagc) 
4 

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK