Thanks CornedBee, I never thought about it :)
Type: Posts; User: idleman
Thanks CornedBee, I never thought about it :)
You don't return anything from that function, so you need to return the value you just counted (numberOfDays), if not you just get a random value.
Instead of using " ", use ' '.
Like this:
if(databaseDays.at(i) == '.')
{
numberOfDays++;
}
What do you mean? It is a concurrent container, it is thread safe to access from multiple threads, both read and write it says in the documentation.
Probably because you are trying to make a Widget variable without to initialize it with don't with don't have a default constructor. Look up initialization lists
Exactly? No, it is different every time I run it of course.
The program acts like it got 2 tbb::concurrent_vector<std::string> separated for each thread, even if it just got one. Even if the...
If you are programming in C++ should you prefer to use SFML instead of SDL.
SFML - Simple and Fast Multimedia Library
Hi all,
I Just have just getting started to use intels Threading Building Blocks, but it just took some minutes before I got some problem. If I am running the code below will m_type.size() always...
Well, I know that, but I have never seen anyone use smart pointers together with allocators of any kind, even if I am not I a programming freak who have it neither as a job or doing it many hours per...
Hi everyone,
Instead of smart pointers is it not usually better to use something like:
Object obj = pool.get(memory_size);
//std::cout.write(static_cast<const...
Hi all,
Is virtual calls really slow or it is just bull........? With slow do I mean "slow" as I should notice it, not just some extra nanoseconds or so, that do I not really call slow. Of course...
SDL is a C library, it is better to use SFML in my opinion, but of course, before you start to use those libraries you most have some basic c++ knowledge.
SFML - Simple and Fast Multimedia Library
I fixed it, thanks for your answers :)
Hi all, I want to be able to do this:
std::vector<???> vec;
vec.push_back(boost::bind(&testClass::run,t));
vec.push_back(boost::bind(&testfunc));
for(int i = 0; i <vec.size(); ++i) //...
Yes, that will work, but it feels wrong and with that memory in my head is it very annoying. I haven't sleep this night either so it can be it too, but if you don't know so are it probably...
Hi everyone, I have some memory that it was possible to write something like this:
class MySpecialClass
{
public:
using namespace boost;
};
Hi all,
I am trying to figure out a good way to implement a Server class which would not be to hard to reuse and I come up with this:
Server
template <typename Handler>
class Server
{...
Ok, it explains it :) Thanks CornedBee
I have understand that matsp, but thanks :)
But I got a new one, how does the delete operator know how large a allocated block is? We say that we write new int[99] and then delete []. How does the...
hehe, I know a week is nothing, but if depends extremely much on what the application do over that time too.
I am realize now how stupid questions I just asked ;D But you have right, no chance in the world the OS could do it :)
Thanks for your answer.
Thanks for you answers!
I have read little about it now but, I have two more questions:
- Why does not the operating system sort the heap then it can? It is impossible or would it suffer too...
Hi all. I just wondering a thing. If I have a program which call new/delete pretty often, will it become slower over time just because the memory become "unordered"? If yes, if I don't do any delete...
Thanks CodeMonekey. The space function in boost.filesystem did fix the job.
And now after some sleep I don't thinks I really need to check max filesize. There is well none modern filesystem that...
Because it sounds like a pretty easy task and I know a OS can use more than one file system. But I will search more.
brewbuck
It was pretty funny.. ;P
Thanks anyway.