13.01.2015 Views

Pensar en C++ (Volumen 1) - Grupo ARCO

Pensar en C++ (Volumen 1) - Grupo ARCO

Pensar en C++ (Volumen 1) - Grupo ARCO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

✐<br />

✐<br />

✐<br />

“Volum<strong>en</strong>1” — 2012/1/12 — 13:52 — page 155 — #193<br />

✐<br />

4.3. El objeto básico<br />

stringStash.initialize(sizeof(char) * bufsize);<br />

ifstream in("CppLibTest.cpp");<br />

assure(in, "CppLibTest.cpp");<br />

string line;<br />

while(getline(in, line))<br />

stringStash.add(line.c_str());<br />

int k = 0;<br />

char* cp;<br />

while((cp =(char*)stringStash.fetch(k++)) != 0)<br />

cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!