|home |print view |recent changes |changed December 12, 2017 | |You are 184.108.40.206 <- set your identity!
Which C++ mechanism can you use to deduce a dimension of an array passed as function parameter?
How do you create an instance of the default-constructible type Block on the heap?
How do you delete the instance created on the heap?
What problem arises if you have loops in your object structure and how do you solve this?
How can you access to a shared pointer from within the
Write a C++ program echor that produces a list of its program arguments in reverse order without using a hand-written loop or recursion.
$ echor zero one two three three two one zero
Take some of your example programs (ExW9) that read all of standard input and process it to take an optional argument for your program giving it the filename to be processed. If no name is given your program should work with standard input as before. If more than one filename is given, your program should work on all files given.
$ wcount wcount.cpp word.h word.cppshould read the three files and output the number of words in these three files combined.
Hint: If you execute such an application from within Cevelop, the working directory will be the project root. This can be relevant if you supply relative paths. If in doubt consult the "Run Configuration" where provide such command line arguments.
Solve the exercise from the OO module in C++ using (smart) pointers to build the graph of objects.
std::shared_ptrto this class. input.txt:
DB1 OO DB2 DB1 Math OO AD1 OO CPI OO Math Thesis DB2 SE2 UI2 SE1 AD1 CPI DB1 SE2 DB1 SE1 UI1 UI1 AD1 UI2 UI1
1: Math OO 2: DB1 AD1 CPI 3: DB2 SE1 UI1 4: SE2 UI2 5: Thesis
auto start=std::chrono::system_clock::now(); // do your stuff std::chrono::duration<double> delta=std::chrono::system_clock::now()-start; out << delta.count() << "s time\n";
|home |print view |recent changes |changed December 12, 2017 |
|You are 220.127.116.11
<- set your identity!