mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-18 10:06:54 +01:00
1a10d49645
git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@288 f6dd340e-d3f9-0310-b409-bdd246841980
27 lines
643 B
C++
27 lines
643 B
C++
#include "stringstore.h"
|
|
#include <iostream>
|
|
|
|
using namespace std;;
|
|
|
|
void display(StringStore const &store)
|
|
{
|
|
for (size_t idx = 0; idx != store.size(); ++idx)
|
|
cout << store.at(idx) << '\n';
|
|
}
|
|
|
|
StringStore *process(char *argv[], int argc)
|
|
{
|
|
StringStore store(argv, argc);
|
|
display(store);
|
|
return new StringStore(argv, argc);
|
|
}
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
StringStore *sp = process(argv, argc);
|
|
delete sp;
|
|
|
|
char buffer[sizeof(StringStore)];
|
|
sp = new (buffer) StringStore(argv, argc);
|
|
sp->~StringStore();
|
|
}
|