Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 28 of 28
Search took 0.01 seconds.
Search: Posts Made By: Lakrids
Forum: C++ Jun 9th, 2008, 3:47 PM
Replies: 12
Views: 282
Posted By Lakrids
Re: Cross-platform exec()

Thanks! But does this mean that on UNIX based systems, in cases where you don't have to do anything (or have to wait) for the child to terminate, it is wiser to use system() than doing


pid_t pid =...
Forum: C++ Jun 9th, 2008, 11:04 AM
Replies: 12
Views: 282
Posted By Lakrids
Re: Cross-platform exec()

Wow, I didn't know that! To be honest, the only time I used system() was back when I started learning C++ and I used system("pause") (they should really change those online tutorials :))...had no...
Forum: C++ Jun 9th, 2008, 7:55 AM
Replies: 12
Views: 282
Posted By Lakrids
Re: Cross-platform exec()

Thank you! I didn't know so much possibilities existed on Wind@ws! I will definately look up popen() and execl(). system() doesn't look like a very good choice, given that you can't communicate with...
Forum: C++ Jun 8th, 2008, 12:44 PM
Replies: 12
Views: 282
Posted By Lakrids
Cross-platform exec()

Hello everyone,

I am quite motivated to code a new programming language this summer. My idea is, given the source code of a program written in this language, to translate it to c/c++ and then...
Forum: C++ Jun 8th, 2008, 11:23 AM
Replies: 5
Views: 223
Posted By Lakrids
Re: Application using data from a file

That is a very bad idea.



C++ doesn't know impossible.

What I would recommend is the following :
1) Whenever you write in the file, you append to it.
2) Whenever you read from the file, you read...
Forum: Java May 7th, 2008, 7:26 AM
Replies: 4
Views: 216
Posted By Lakrids
Re: PriorityQueue problem

Yup, apparently I don't have the "Java Collections Framework", which includes the PriorityQueue class, which is very weird, because I thought I installed everything java-related.

Well, thanks for...
Forum: Java May 7th, 2008, 5:33 AM
Replies: 4
Views: 216
Posted By Lakrids
PriorityQueue problem

Hello,

I am writing a program which needs at a certain point the use of priority queues. For that I use java.util.PriorityQueue. The problem is that javac refuses to compile my code, and I just...
Forum: C++ Mar 20th, 2008, 2:51 PM
Replies: 3
Views: 182
Posted By Lakrids
Forum: C++ Mar 20th, 2008, 7:34 AM
Replies: 3
Views: 182
Posted By Lakrids
Extremely weird program behavior

Hello,

I have been programming for quite a while now, but the following behavior is one of the most weird ones I ever encountered. It really is annoying me, and I just can't get to the bottom of it....
Forum: C++ Feb 11th, 2008, 1:35 PM
Replies: 15
Views: 381
Posted By Lakrids
Re: Pointer to member function

Yes, that's right. But I couldn't resist accepting an already-done code... :) As for the boost code, thank you, that could also help me.

As for finally getting to the very bottom of (non-)static...
Forum: C++ Feb 10th, 2008, 4:55 PM
Replies: 15
Views: 381
Posted By Lakrids
Re: Pointer to member function

Lol thanks! :) But a fellow programmer just pointed me out that in fact, it is possible. And he wrote me code which works. The idea is to make a static wrapper member function which will call the...
Forum: C++ Feb 10th, 2008, 11:16 AM
Replies: 15
Views: 381
Posted By Lakrids
Re: Pointer to member function

OK, problem solved with static member functions. But problem persists with non-static ones :(

Any ideas?
Forum: C++ Feb 10th, 2008, 6:03 AM
Replies: 15
Views: 381
Posted By Lakrids
Re: Pointer to member function

You're right! Thanks! So what you suggest, is to have some kind of CallbackListener class from which the objects I want to manipulate inside the button handling code inherit? That would solve my...
Forum: C++ Feb 10th, 2008, 5:14 AM
Replies: 15
Views: 381
Posted By Lakrids
Re: Pointer to member function

Yes, but the thing is, I don't want to have an ObjectA or an ObjectB as private members of the Button class. The code must work for any kind of object there is. In other terms, the button handling...
Forum: C++ Feb 9th, 2008, 4:51 PM
Replies: 15
Views: 381
Posted By Lakrids
Re: Pointer to member function

Thank you for your reply. However, it's not exactly what I was looking for. I don't think I was clear enough in my question, so here's a simple example :


class Button {
public :
...
Forum: C++ Feb 9th, 2008, 12:11 PM
Replies: 15
Views: 381
Posted By Lakrids
Pointer to member function

Hello,

There is a quite problematic issue I would like to have solved.

Consider an event handling function for a button. This function takes, among it's arguments, a pointer to a function, which it...
Forum: C++ Jan 19th, 2008, 4:32 AM
Replies: 4
Views: 154
Posted By Lakrids
Re: Inherited operator= malfunctioning

Yeah, your right as usual Grumpy. Now it works. Thanks!
Forum: C++ Jan 18th, 2008, 12:11 PM
Replies: 4
Views: 154
Posted By Lakrids
Re: Inherited operator= malfunctioning

Yes, but if you pass an object B to it, it will automatically be converted into an object A. So no need for such an operator! Also, I am not allowed to add such a method into A (project...
Forum: C++ Jan 18th, 2008, 11:22 AM
Replies: 4
Views: 154
Posted By Lakrids
Inherited operator= malfunctioning

Hello,

I have a weird problem with an inherited operator=. Here's a simplified code of the situation :


class A {
public:
A& operator=(const A&);
};
Forum: C++ Jan 12th, 2008, 11:06 AM
Replies: 8
Views: 176
Posted By Lakrids
Re: Friends in inheritance

Wow thanks! I'm sure I'll be able to put it to use!
Forum: C++ Jan 12th, 2008, 3:42 AM
Replies: 8
Views: 176
Posted By Lakrids
Re: Friends in inheritance

Thank you ever so much for these tips.

As for your remarks about the implementation of the list, I agree with you. This code is not mine, it is given by an educator, who wants us to further enhance...
Forum: C++ Jan 11th, 2008, 9:53 AM
Replies: 4
Views: 122
Posted By Lakrids
Re: Double window -

No problem :) But unfortunately I cannot help you with WIN32, I have never used it...maybe some of the more experimented programmers here will be able to help you out.
Forum: C++ Jan 11th, 2008, 6:07 AM
Replies: 8
Views: 176
Posted By Lakrids
Re: Friends in inheritance

First of all, thank you for your help.

Second, here is the actual code :


// Class "A"
template <typename T> class LinkedList {
protected:
class Element;
Element *headOfList;
Forum: C++ Jan 11th, 2008, 4:45 AM
Replies: 8
Views: 176
Posted By Lakrids
Re: Friends in inheritance

Nice guess, I AM working with template classes. OK, here's the simplified code to illustrate what is happening :

template <typename T> class A {
protected :
class C;
public :
...
Forum: C++ Jan 11th, 2008, 4:16 AM
Replies: 4
Views: 122
Posted By Lakrids
Re: Double window -

Hello,

Given your question, I reckon you're using MS Visual C++. If this is the case, it is quite simple to make a new window. Just create a new form within the same project, write the code for the...
Forum: C++ Jan 11th, 2008, 3:56 AM
Replies: 8
Views: 176
Posted By Lakrids
Friends in inheritance

Hello,

There is a rather annoying problem in my code, and I just can't get to the bottom of it. I have a class, A, and another one, B, which inherits from A. Now, A has a friend class, C, which is...
Forum: C++ Dec 23rd, 2007, 6:24 AM
Replies: 2
Views: 111
Posted By Lakrids
Re: Weird inheritance problem

Wow, thank you, exactly what I was looking for!
Forum: C++ Dec 23rd, 2007, 5:04 AM
Replies: 2
Views: 111
Posted By Lakrids
Weird inheritance problem

Hello,

I have just encountered a very weird error with multiple inheritance, and after many efforts trying to find the problem without success, I thought maybe you guys will be able to help me...
Showing results 1 to 28 of 28

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC