Learn how to:
*
Tokenize a null-terminated string
*
Create a search and replace function for strings
*
Implement subtraction for string objects
* Use the vector, deque, and list sequence containers
*
Use the container adaptors stack, queue, and priority_queue
* Use the map, multimap, set, and multiset associative containers
*
Reverse, rotate, and shuffle a sequence
*
Create a function object
*
Use binders, negators, and iterator adapters
*
Read and write files
*
Use stream iterators to handle file I/O
*
Use exceptions to handle I/O errors
*
Create custom inserters and extractors
*
Format date, time, and numeric data
* Use facets and the localization library
*
Overload the [ ], ( ), and -> operators
*
Create an explicit constructor
*
And much, much more
這兩個函數
function app_path1:string
function socket_rec_line1(socket1:TCustomWinSocket timeout1:integer crlf1:string=#13#10):string
實際上是我的一個公用單元中的函數,大家應該養成建立自己的公用單元的習慣。
socket_rec_line1函數中用了唐曉峰大俠的coolmail中的辦法:只是簡單的一個一個字節收取,找到結束
標志后就算收完一行了,大家實際應用時可能應該找更好的辦法。
This book introduces embedded systems to C and C++ programmers. Topics include testing memory devices, writing and erasing Flash memory, verifying nonvolatile memory contents, controlling on-chip peripherals, device driver design and implementation, optimizing embedded code for size and speed, and making the most of C++ without a performance penalty.