Well done. :)
Using a private member function generally isn't allowed. `GetNext()` and `SetNext()` are in the public section of the Player class, so it's perfectly fine.
Your expectations of...
Type: Posts; User: msh
Well done. :)
Using a private member function generally isn't allowed. `GetNext()` and `SetNext()` are in the public section of the Player class, so it's perfectly fine.
Your expectations of...
I agree. The relationship between developers and their tools: languages, compilers, frameworks, OS and so on, should be one-to-many. Having favorites is good and even desirable; going all exclusive...
TBH, C++ Standard is a goodnight read compared to that.
You don't have to abandon one language to learn another, and neither do you need PhD in <language-x> to do something useful with it.
Madness! (That'd work, too.)
It'd be better to just install MinGW with MSYS, which comes with a shell that gives you a sane if minimalistic *nix environment to work in.
Had some fun with iterators. :redface: I think the sub-sum part came out very neat. Disregarding the ugly conditional inclusions...
#include <iostream>
#include <fstream>
#include <vector>...
Stop being <language-x> programmer! <language-x> is a tool, you can have many of them -- what a concept!
If your passion is <language-x> and you're not a compiler developer, then you're doing it...
You have to learn to crawl before you can use portals.
We don't, but we can with `std::string::reserve()`.
Why you're calling `getline()` on L36 if you already copied the header text into `header` on L28-L32?
Anyhow. Your strange behaviour is caused by the fact that `>>` operator skips leading...
No. Second parameter is a buffer that receives data, but `c_str()` returns `const char*`.
Try implementing this and come back to us if you get stuck.
UVa 108 - Algorithmist
You're right.
Yes, it's not a pointer in a strictly C sense, but, and correct me if I'm wrong, that is what it will become during compilation -- an address in the data segment where the string...
It might involve writting some code... I dunno...
Sort the array in ascending order; then first N elements of it will be the N smallest numbers in the array.
Repeat after me: "I'm not coding for CPU, I'm coding for the OS".
Sure, you could implement some sort of concurrency middleware between the OS and your application. Whether can implies should is...
Concurrency is as OS-specific as OS features come. You should use a multi-threading library that is cross-platform instead. Google for it.
kcuF this code; you don't want to program like this.
It works because pointers are integral types and addition is commutative for them, and, for example, `3["this"]` is the same `("this") + 3`.
Pretty sure I could end world hunger with that sort of money...
Why would you think it necessary to have a null terminator in this case?
Which one do you want?
int (*p)[2]; // pointer `p` to array of 2 int's
int *p[2]; // array `p` of 2 pointers to int
Just call `fclose(fopen(filename, "w"));`.
No. I mean your #include directives.
Show us a list of your includes.