Haiin zhu pointerdata pointerpointer1000 char const

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 清清清清清 string 清清清清 ==>C++ 清清清清清 清清清清清清清清清 02/25/14 #include <string> #include <iostream> #include <fstream> #include <vector> #include <windows.h> using namespace std; 清清清清清清清清 CIMS 清清 清清清清清清清清 fillvector Dr. Haiin Zhu void main() { vector<string> v; ifstream in(" 清清清清 .txt"); string line; while(getline(in, line)) v.push_back(line); // Add the line to the end cout <<" 清清 ....."<<endl; for(int i = 0; i < v.size(); i++) { line = v[i]; string delay = line.substr(0,line.find(' ')); line = line.substr(line.find(' ')); ::Sleep(atoi((char*)delay.c_str())); cout <<line<< endl; } } 02/25/14 清清清清清清清清 CIMS 清清 Dr. Haiin Zhu 清清清清清清清清 Vector : push_back(…) size(); v[i] Ifstream: in(" 清清清清 .txt"); getline(in, line); string: line.find(' ') line.substr(0,line.find(' ')); 02/25/14 清清清清清清清清 CIMS 清清 清清清清清清清清...
View Full Document

Ask a homework question - tutors are online