-
cin.get -
cin.unget -
getline(cin, var) -
cin >> var -
coutis slow because it has to go to the operating system -
To have good speed, use internal buffers. Use
ostringstreamto build it up, build it up, and then when you're done, finally do only onecout:cout << myStringStream.str()
-
Helps you deal with command line arguments and options.
-
Arguments versus options:
ls -ahas-aas an argument,cd hihashias an argument -
Passing
argcandargvtogetoptto the function, it helps you -
getopthas a website and the slides have stuff too -
getopt_longyou can have things like--help; words, rather than just single-character ones
-
O(g(n)) = f(n) if g(n) is an upper bound to f(n)
-
Big omega means the worst case
-
Big theta means that the upper bound and lower bound are the same thing
-
2x^4 + 2x = O(x^4)