函数勿看~(string::npos) :: 我的工作

函数勿看~(string::npos) 时间: 2004-08-02 // test25.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> #include <vector> #include <algorithm> #include <list> using namespace std; int main() { string line("v2c3d7R4E6"); string::size_type pos=line.find("a");//如果没有找到a不是返回1 cout<<"pos="<<pos;//而是返回一个int型随机值,所以string::npos只代表非零数 return 0; } chifanhezhou 引用(Trackback0) | 编辑 评论 发表评论 用户名: Email: 主页: 最后更新 收尾的地方~ 完整的作業程序 還沒有用f流的函數雛形 今天的题目~ 函数勿看~(文本的互相剪切) 函数勿看~(两同类型容器的交换和赋值实验) 函数勿看~(vector的插入和排序) 函数勿看-----(单iterator的容器删除) 函数勿看~(string::npos) 函数勿看~(文本分类查找程序)

原始快照:web.archive.org