|
Martman posted:Hi everyone. I've got an issue with random numbers. Boost has a very nice random number library, read more here Although I agree with the above poster that it is unlikely to be the cause of your problems. Just to cover all the bases- you're only seeding the RNG once, right?
|
# ¿ Dec 10, 2008 14:21 |
|
|
# ¿ May 2, 2024 17:20 |
|
You wrote too many comments and overloaded the compiler
|
# ¿ Dec 11, 2008 22:13 |
|
Is it possible to define member functions of a private nested class as non-inline? How?
|
# ¿ Jan 12, 2010 02:32 |
|
Why. Whyyyy http://codepad.org/Zu1ziyYt
|
# ¿ Apr 19, 2010 15:41 |
|
Paniolo posted:Because an array is not a pointer, even if you can use it like one in certain situations. Can you please elaborate/link me to something because I always assumed buffer in this case would just a pointer to the first element of the array
|
# ¿ Apr 19, 2010 15:57 |
|
jonjonaug posted:Read this for information on the relationship between pointers and arrays in C/C++. Thanks for the link. The More You Know...
|
# ¿ Apr 19, 2010 16:51 |
|
I have what I feel is a dumb question but I can't figure out a solution to it that I like. Let's say I have a few objects with a common base class. I want to add them to some container I've defined that will have to perform some different actions depending on which derived class is being added. I wish I could do something like overload some function like: code:
code:
|
# ¿ Oct 6, 2010 16:37 |
|
Thanks!!
|
# ¿ Oct 6, 2010 17:28 |
|
rawstorm posted:Help please. I googled it and the first result explained literally everything you're asking, have some shame please
|
# ¿ Oct 6, 2010 23:33 |
|
unpurposed posted:I'm just getting started with C, so I'm not very well versed in the intricacies of it. Something that's confusing me, but that I was told was correct, is using this uint32_t as a sort of array. It works properly and my code sorts everything right, but I don't know why I can index into this uint32_t like that. uint32_t just specifies that you want an unsigned 32 bit integer. Your two arguments to sort (left and right) are not uint32_t's, they are pointers to uint32_t's. You can index it as you do because presumably you have elsewhere allocated memory between whatever left and right point to. Also, *(index + 1) is the same as index[1] When you say you want a range of an array, what exactly do you mean? Do you want to make a copy of the array you already have, containing only a subset of the original values? If not, you can just pass anyone a pointer to array[start], and the length of the range of values you want.
|
# ¿ Oct 6, 2010 23:51 |
|
fankey posted:FYI - we are C++ developers in Boulder CO. do ya'll pay BONKERS money tho
|
# ¿ Sep 22, 2018 05:10 |
|
|
# ¿ May 2, 2024 17:20 |
|
giogadi posted:I always find it sad when we have to give context like “it’s for an assignment” to justify doing something in a weird (or worse) way. Surely if something is worth learning about in school, then there must be some way to apply it that actually makes sense in practice too. And so on, Sure. I'd tend to agree
|
# ¿ Apr 13, 2024 04:00 |