Search:
Type: Posts; User: acppdummy
Search:
Search took 0.02 seconds.
-
October 7th, 2013, 10:14 PM
Update: well running the program gave me the answer. There were a bunch of messages - something like "can't write to non-existent pipe". So I should read all the output. Thanks!
-
October 7th, 2013, 08:54 AM
I just started using popen( ) to read command line output into my program. Do I have to finish reading all of the output from it or is it OK to close the file after reading just a number but not the...
-
July 24th, 2013, 08:04 AM
I would love to find the bug if I could. The program runs many thousands of loops. The corruption only occurs very occasionally in one or a couple of the loops. It would be a lot easier if the...
-
July 23rd, 2013, 08:02 AM
Thank you both! The code compiles (with g++ tool) and runs fine under Cygwin. However under MinGW (also compiled with g++ tool that came with MinGW), a few simple double variables declared...
-
July 22nd, 2013, 07:43 PM
Can typedef and struct be put inside a class like below? Thanks!
class classA {
private:
typedef void(classA::*aFnPtr_t) (); //pointer-to-member function
struct strctA {
...
-
July 17th, 2013, 10:16 AM
Yes in my particular situation I need a global list of certain objects of classA so a static member just fits the need. Thanks!
-
July 15th, 2013, 09:05 AM
Thank you! I have changed the vector to a static member of classA instead.
-
July 12th, 2013, 08:14 PM
Thank you for the quick reply! Yes I will have to redo the design.
-
July 12th, 2013, 12:29 PM
It's hard to give a precise title but here is the question in detail: I have a class, something like this:
class classA{
public:
void fnA();
...
};
and another class that...
-
June 19th, 2013, 08:11 PM
Well I found this
http://www.autohotkey.com/
so I don't have to re-invent the wheel so to speak. Thanks!
-
I would like to make a simple application that clicks some buttons in other (already open) applications' windows. I also would like to avoid VC and use MinGW g++ instead. Is it possible? If so could...
-
Thank you everyone for offering to help! I will first try to duplicate the problem with a small example. If that doesn't work then I will zip up the full program and upload. Thanks again!
-
Well it's a bit complicated: the function pointer that points to either fn1 or fn2 is used inside another member function of the same class like this:
(this->*fnptr)()
and fn1 and fn2 actually...
-
Thank you! But I tried both
public:
MyClass(): fnptr(&MyClass::fn1){
...
}; and
public:
MyClass(): {
fnptr=&MyClass::fn1;
-
Another question: can the assignment be done in the constructor? (to initialize the pointer)
I tried it but kept getting core dump. :confused:
-
Thanks! So if I understand it correctly, when calling from mc1,
(this->*fnptr)()
calls
mc1.fn1
and
-
Wait! When calling the function pointer it is just calling the function pointer, not the actual function. So it's still not clear to me how
mc1.fn1 and
mc2.fn1 are distinguished. :confused: Does ...
-
Ah yes. Now I remember another thing the compiler wants me to do is
(this->*fnptr)(), not just
fnptr().
Thank you! :)
-
I have a class with member functions and a pointer like this:
class MyClass{
private:
typedef void(MyClass::*memFnPtr_t) ();
public:
memFnPtr_t fnptr;
void fn1();
void...
-
July 16th, 2012, 12:46 PM
Thanks! Point well taken - I already fixed the code when VC++ did not do the "smart optimization" and exposed the bug. The exercise of looking at the assembly code was just to understand why g++...
-
July 16th, 2012, 08:57 AM
Any NetBeans user out there that knows the trick? Thanks!
-
July 16th, 2012, 07:48 AM
Hello all, Thank you very much for the comments. I learned a lot from this forum as always. Here is what I found:
Using the -S switch I let g++ produce assembly codes for each of the two...
-
July 15th, 2012, 11:09 AM
First of all sorry for my stupid comment about g++ having a "bug". I know it is a well built tool.
I know the binaries are the same because I use BeyondCompare to do binary comparisons. When I...
-
July 15th, 2012, 09:36 AM
Thanks for the comments about '/' vs '\\'.
Now I am still fascinated by the fact that g++ produced identical binaries from codes with different logic. So I made a small example project and tested...
-
July 14th, 2012, 01:07 PM
A related question: There are two huge files "projectname.sdf" and "projectname-xxxxxx.ipch". Can they be disabled or deleted? Thanks!
|
Click Here to Expand Forum to Full Width
|