Forum: C++ Jul 9th, 2009 |
| Replies: 1 Views: 183 Hi everybody,
I am having some problems with a multi-threaded application I am developing. I get segmentation faults in different places, always related to std::string, using g++4.3.2 on Ubuntu... |
Forum: C++ Jul 7th, 2009 |
| Replies: 15 Views: 834 Thanks, this looks like what I want for windows. As soon as I have tried it, I will post comments on it. |
Forum: C++ Jul 7th, 2009 |
| Replies: 15 Views: 834 I don't understand what's so difficult about multi-threading for you. Threads yield execution to other threads and gain it back and yield again... etc. When they yeld they are not running anymore so... |
Forum: C++ Jul 7th, 2009 |
| Replies: 15 Views: 834 When you spawn the thread you pass a void pointer, which means you pass a pointer to something (or nothing). I am already using this to pass some arguments to the threads.
Wildgoose, I don't get... |
Forum: C++ Jul 6th, 2009 |
| Replies: 15 Views: 834 A task counter would not solve the problem because what I want is the workers to stop after x elapsed time.
In the meanwhile I found this thread: ... |
Forum: C++ Jul 6th, 2009 |
| Replies: 15 Views: 834 Hi,
Ok, I don't need to totally understand how you do it to use it, but my purposes are different from benchmarking. This averaging is a very clever idea indeed, but I will not run the same... |
Forum: C++ Jul 4th, 2009 |
| Replies: 15 Views: 834 Like wildgoose pointed out, in a multi-threaded environment if one uses the system functions like clock or time will not be able to measure the thread's execution time but only the global (process)... |
Forum: C++ Jul 3rd, 2009 |
| Replies: 15 Views: 834 Hi everyone
I've been looking into boost and c++ reference, as well as some googling, and I cannot find a way to get a thread's execution time, all options I found are related to system time and I... |
Forum: C++ Jun 19th, 2009 |
| Replies: 4 Views: 289 I tried with VC++ debugger and here I get a proper location to look for an inconsistency, not the class declaration anymore. Any hints on why this GDB behavior? |
Forum: C++ Jun 19th, 2009 |
| Replies: 4 Views: 289 Hello
I am using meta-programming so posting evrything here will probably be useless adn confusing. What I am really looking for is maybe a hint of how to further debug this or what the meaning of... |
Forum: C++ Jun 18th, 2009 |
| Replies: 4 Views: 289 Hello,
I am developing a library, which untill a few days ago was working perfectly. With some changes I needed to perform I started having a segmentation fault. The problem is that I cannot... |
Forum: C++ Jun 17th, 2009 |
| Replies: 3 Views: 314 Hi all,
Thank you adatapost for your attention and reply.
Just a while ago I found http://www.parashift.com/c++-faq-lite/pointers-to-members.html in which point 33.2 explicitly explains my... |
Forum: C++ Jun 16th, 2009 |
| Replies: 3 Views: 314 Hi all,
I am new to threads in c++, and I must use the pthread library. The documentation is easy to understand, but there is a more general aspect that I am missing. My question is: Is it... |
Forum: C++ Apr 9th, 2009 |
| Replies: 1 Views: 209 Because it is a template parameter derived type it needs the typename keyword before.. For some reason VC++ compiles anyway... |
Forum: C++ Apr 9th, 2009 |
| Replies: 1 Views: 209 Hello,
I developed an application in VC++ an now I want to compile it using GNU++ to be run on a ubuntu server (where I am actually trying tocompile it). After some syntax/usage corrections I get... |
Forum: C++ Feb 23rd, 2009 |
| Replies: 6 Views: 354 Hello,
The example doens't show it all. I need to do this because there is code where I call a function that exists in A2 but not in A1 for instance. And if I have the if (run-time structure) it... |
Forum: C++ Feb 20th, 2009 |
| Replies: 6 Views: 354 Hello all,
I am trying to use the #if directive to compile extra functionality acording to some class template parameter defined integer constant. What I want to do is this:
struct A1{... |
Forum: C++ Feb 10th, 2009 |
| Replies: 9 Views: 782 Well, I know this :) That's why I am having such problems. I have one class, say C, that, in the constructor, reads a file and according to this file will aggregate a object, say B, which has an int... |
Forum: C++ Feb 9th, 2009 |
| Replies: 9 Views: 782 Hello, and thank you for the reply. Yes, what I am trying to do is some kind of template dispatch. I could have made the example a bit shorter maybe but not much. I need, in fact, the template... |
Forum: C++ Feb 5th, 2009 |
| Replies: 9 Views: 782 Well, I know you re not being paid. However, that doesn't give you the right to be rude, as I think you were in your first post. You're just one more specialist in something, like there are a lot of... |
Forum: C++ Feb 5th, 2009 |
| Replies: 9 Views: 782 Well, so far, nobody replied. But if I am freaking out someone I can remove it. Why is it a waste of time? And, if you consider it a waste of time what are you doing here? Are you being paid or... |
Forum: C++ Feb 5th, 2009 |
| Replies: 9 Views: 782 Hello all,
Before anything else, this issue is also posted at: http://www.cplusplus.com/forum/general/7518/
I have a structure similar to the one below.I miss a lot of information about the... |
Forum: C++ Jan 8th, 2009 |
| Replies: 0 Views: 3,009 Hello all,
I am using VS2008 and I have a solution with 3 projects. One is the Loki library, another one is a library designed by me and the other is a small application that uses a part of my... |
Forum: C++ Nov 27th, 2008 |
| Replies: 1 Views: 329 Hello,
I implemented the follolwing function:
template< int n >
struct GetNRands{
static void fillVector( set<int>& v, int max ){
if( n > 0 ){
int f; |
Forum: C++ Nov 12th, 2008 |
| Replies: 1 Views: 298 I've compiled the loki library through the command line and it created the libloki.a which links correctly.
Rui Lopes |
Forum: C++ Nov 11th, 2008 |
| Replies: 1 Views: 298 Hi all,
I was developing my app under Linux, using the Loki library. No I am trying to work on it using visual c++ under windows XP.
I can compile without errors both my project and the loki... |
Forum: C++ Oct 30th, 2008 |
| Replies: 1 Views: 663 LOKI_TYPELIST_X instead of TYPELIST_X as presented in the book.
Thank you all for the interest |
Forum: C++ Oct 30th, 2008 |
| Replies: 1 Views: 663 Hello all,
I am trying to templatize a class with a Typelist. Until here everything good. But I cannoyt create a Typelist to define the templated class. The following model reproduces the problem:... |
Forum: C++ Oct 28th, 2008 |
| Replies: 2 Views: 629 Hello,
You're right, the title was a little bit unfortunate. Indeed the problem is that part of the library must be compiled. I linked the libloki.a and the problem is gone.
Thank you and kind... |
Forum: C++ Oct 28th, 2008 |
| Replies: 2 Views: 629 Hello,
I am writing an application that uses the Loki library and I get undefined references inside loki if I use the DefaultSPStorage with std::vector<int> (it happens the same with int or using... |