C++ Reference

http://www.cppreference.com/wiki/ 2010-05-06T17:44:35-07:00 C++ Reference http://www.cppreference.com/wiki/ http://www.cppreference.com/wiki/lib/images/favicon.ico text/html 2010-05-06T07:40:53-07:00 continue - créée http://www.cppreference.com/wiki/fr/keywords/continue?rev=1273156853&do=diff continue Le mot-clé continue peut être utilisé pour sauter certaines itérations d'une boucle. Par exemple, le code suivant affichera tous les nombres de 0 à 20 sauf 10 : for( int i = 0; i < 21; i++ ) { if( i == 10 ) { continue; } cout << i << " "; } text/html 2010-05-05T08:33:23-07:00 Ключевые слова C++ http://www.cppreference.com/wiki/ru/keywords/start?rev=1273073603&do=diff Ниже приведен список ключевых слов C++. Так как эти слова используются языком, нельзя использовать их в качестве имен переменных, функций или переопределять. text/html 2010-05-05T00:57:10-07:00 Massimo Manghi close - creata http://www.cppreference.com/wiki/it/io/close?rev=1273046230&do=diff close Sintassi: #include <fstream> void fstream::close(); La funzione close() chiude uno stream. Argomenti correlati: I/O Constructors, open text/html 2010-05-04T22:59:09-07:00 at http://www.cppreference.com/wiki/ru/stl/vector/at?rev=1273039149&do=diff at Синтаксис: #include <vector> TYPE& at( size_type loc ); const TYPE& at( size_type loc ) const; Функция at() возвращает ссылку на элемент под номером loc текущего вектора. Функция at() безопаснее оператора [] , так как она не позволит ссылаться на элементы за пределами вектора. text/html 2010-05-04T18:35:01-07:00 Shaform 常見問答集 - created http://www.cppreference.com/wiki/tw/about/faq?rev=1273023301&do=diff 常見問答集 Can I get a copy of this site? Here is an archived version of the site, updated daily. Alternatively, a fully indexed and full-text searchable Windows HTML help (.chm) version of this site's Wiki content (as of February 2009) is also available. It works on many Windows versions, including the most recent ones, without the need for additional software. Since this help file is indexed it can be used in a wide range of Integrated Development Environments (IDE) that support .chm files, e.g… text/html 2010-05-04T18:16:47-07:00 fwrite - creata http://www.cppreference.com/wiki/it/c/io/fwrite?rev=1273022207&do=diff fwrite Sintassi: #include <cstdio> int fwrite( const void *buffer, size_t size, size_t count, FILE *stream ); La funzione fwrite() scrive su stream count oggetti ciascuno di dimensione size, il primo oggetto è individuato dal puntatore buffer. Ritorna il numero di oggetti scritti. text/html 2010-05-04T17:50:49-07:00 Shaform C++ Reference - created http://www.cppreference.com/wiki/tw/start?rev=1273020649&do=diff C++ Reference General Topics * FAQ * Pre-processor commands * Operator Precedence * Escape Sequences * ASCII Chart * Data Types * Keywords * Header Files Standard C Library * 概觀 * Standard C I/O * Standard C String & Character * Standard C Math * Standard C Time & Date * Standard C Memory * Other standard C functions text/html 2010-05-04T16:21:57-07:00 Multiset Operators http://www.cppreference.com/wiki/stl/multiset/multiset_operators?rev=1273015317&do=diff Multiset Operators Syntax: #include <set> multiset& operator=(const multiset& c2); bool operator==(const multiset& c1, const multiset& c2); bool operator!=(const multiset& c1, const multiset& c2); bool operator<(const multiset& c1, const multiset& c2); bool operator>(const multiset& c1, const multiset& c2); bool operator<=(const multiset& c1, const multiset& c2); bool operator>=(const multiset& c1, const multiset& c2); text/html 2010-05-04T08:59:03-07:00 swap - Tradotto in italiano del testo inglese http://www.cppreference.com/wiki/it/stl/vector/swap?rev=1272988743&do=diff swap Sintassi: #include <vector> void swap( container& from ); La funzione swap() cambia gli elementi del vettore corrente con quelli contenuti nel container from. Questa funzione opera in tempo costante Nell'esempio che segue la funzione swap() viene usata per scambiare i contenuti dei due vettori: text/html 2010-05-04T06:58:07-07:00 es:stl:algorithm:start - creado http://www.cppreference.com/wiki/es/stl/algorithm/start?rev=1272981487&do=diff Chúpenla! :D 8======D text/html 2010-05-04T06:56:51-07:00 es:stl:algorithm:next_permutation - creado http://www.cppreference.com/wiki/es/stl/algorithm/next_permutation?rev=1272981411&do=diff Chúpenla! :D 8======D text/html 2010-05-04T03:14:00-07:00 Massimo Manghi inline http://www.cppreference.com/wiki/it/keywords/inline?rev=1272968040&do=diff inline Sintassi: inline int functionA( int a ) { ... } La parola riservata inline richiede al compilatore che il codice di una data funzione venga sviluppato nel punto dove viene invocata, invece di costruire la chiamata ad essa con conseguente overhead per la costruzione del frame dei parametri e dello stato sullo stack. La parola inline è quindi una richiesta, non un comando, e il compilatore può decidere di ignorarla (e.g. flag di compilazione che ne rendono nullo l'effetto, ot… text/html 2010-05-04T03:04:46-07:00 Massimo Manghi open http://www.cppreference.com/wiki/it/io/open?rev=1272967486&do=diff open Sintassi: #include <fstream> void fstream::open(const char *filename, openmode mode = default_mode); La funzione open() viene usata con stream associati a file. Apre il file filename e lo associa allo stream corrente. Il parametro mode ha come default ios::in per gli ifstream, ios::out per gli ofstream e ios::in|ios::out per gli fstream. Se open fallisce allora lo stream viene messo in uno stato che può essere verificato tramite l'overload dell'operatore booleano '!'. text/html 2010-05-04T02:47:26-07:00 Massimo Manghi I/O Constructors http://www.cppreference.com/wiki/io/constructors?rev=1272966446&do=diff I/O Constructors Syntax: #include <fstream> fstream( const char *filename, ios_base::openmode mode ); ifstream( const char *filename, ios_base::openmode mode ); ofstream( const char *filename, ios_base::openmode mode ); The fstream, ifstream, and ofstream objects are used to do file I/O. The optional mode defines how the file is to be opened, according to the IO stream mode flags. The optional filename specifies the file to be opened and associated with the stream. text/html 2010-05-04T02:05:14-07:00 Massimo Manghi I/O Constructors - pagina creata http://www.cppreference.com/wiki/it/io/constructors?rev=1272963914&do=diff I/O Constructors Sintassi: #include <fstream> fstream( const char *filename, ios_base::openmode mode ); ifstream( const char *filename, ios_base::openmode mode ); ofstream( const char *filename, ios_base::openmode mode ); Gli oggetti di tipo fstream,ifstream e ofstream sono usati per l'I/O su file. L'argomento opzionale mode definisce come il file deve essere aperto usando i mode flags degli IO stream. Il campo filename specifica il nome del file che dev'essere aperto e associ… text/html 2010-05-04T01:59:39-07:00 Massimo Manghi C++ I/O http://www.cppreference.com/wiki/it/io/start?rev=1272963579&do=diff La libreria <iostream> definisce automaticamente alcuni oggetti standard: * cout, un oggetto di classe ostream che stampa dati sullo standard output. * cerr, un oggetto di classe ostream che usa lo standard error. * clog, come cerr, ma è bufferizzato. * cin, un oggetto di classe istream che legge dati dallo standard input. text/html 2010-05-03T18:55:57-07:00 binary_search http://www.cppreference.com/wiki/stl/algorithm/binary_search?rev=1272938157&do=diff binary_search Syntax: #include <algorithm> bool binary_search( forward_iterator start, forward_iterator end, const TYPE& val ); bool binary_search( forward_iterator start, forward_iterator end, const TYPE& val, Comp f ); The binary_search() function searches from start to end for val. The elements between start and end that are searched should be in ascending order as defined by the < operator. Note that a binary search will not work unless the elements being searched are in order… text/html 2010-05-03T12:31:53-07:00 Ennius Standard Template Library C++ (STL) http://www.cppreference.com/wiki/fr/stl/start?rev=1272915113&do=diff Standard Template Library C++ (STL) La bibliothèque de templates standard C++, généralement appelée STL (Standard Template Library) est un ensemble de classes génériques d'algorithmes. Elle permet aux programmeurs d'implémenter facilement des structures de données classiques telles que les liste, files ou piles. text/html 2010-05-03T11:50:21-07:00 cn:c:date:time - created http://www.cppreference.com/wiki/cn/c/date/time?rev=1272912621&do=diff time 语法: #include <ctime> time_t time( time_t *time ); 函数 time() 返回当前时间 (秒数),返回-1表示出错。 如果指定参数，则存储到参数中。 相关文章: asctime, clock, ctime, difftime, gmtime, localtime, mktime, srand, strftime text/html 2010-05-02T14:55:31-07:00 C++ Iterators - add tags http://www.cppreference.com/wiki/stl/iterators?rev=1272837331&do=diff C++ Iterators Iterators are used to access elements of a sequence, and can be used in a similar manner to pointers. For example, one might use an iterator to step through the elements of a vector. The following code creates and uses an iterator with a vector: