|
|
i go with this simple structure
typedef struct sturctEGO {<br />
int ID;<br />
int Superego; <br />
int Ego = Superego - ID; <br />
} Me;
Am i right ?
the theory http://en.wikipedia.org/wiki/Id,_ego,_and_super-ego
|
|
|
|
|
Had you actually tried to compile this before asking the question you would have noticed that the line
int Ego = Superego - ID;
produces a number of errors, as it is an invalid expression. Other than that your structure may or may not have some use.
It's time for a new signature.
|
|
|
|
|
Craps: you're an idiot!
You're simply wrong.
Well, it is pretty good, but you probably can do better.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
It's not for any use...only to help informatics students understand better the structure model of Sigmund Freud the ones that listen psychology class in high school
|
|
|
|
|
phicho wrote: to help informatics students understand better the structure model of Sigmund Freud
I don't think it will help anyone to understand anything.
It's time for a new signature.
|
|
|
|
|
You should have posted this in the Lounge.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hi,
Is there a way to know if a window is completely Obscured i.e the window is "not visible" to the user but it is behind another larger application window.
I am trying to do or not do something if the window is completely hidden from the user but not made invisible.
Thanks in advance.
|
|
|
|
|
I'd have thought you would enumerate each window and look at their clipping regions - what I dont know is if you can do this in some 'order' ie from 'front' (of screen) to back or 'depth'
Bizarrely enough, I was just checking out this An HTML5 Remote Desktop - Part I[^] and he starts with some routines that might interest you
[edit]
This may be a better way of getting all HWNDS - you'd still then have to traverse the windows represented, testing for intersections etc
http://www.gettingclever.com/2008/12/list-your-hwnds.html[^]
[/edit]
'g'
modified on Tuesday, May 11, 2010 6:08 PM
|
|
|
|
|
Thanks,
I will have alook, I should have specified that i was looking for a windows event something WM_blahblah.
|
|
|
|
|
|
Yeah, sounds interesting except for the caveat. I need to be make it work for all versions of Windows.
|
|
|
|
|
Hi, dear all,
I am using VB6. I am running a program created years ago. when I open a form, I got the following error:
Line 75: Property OleObjectBlob in dirDDBox could not be set.
Line 75: Cannot load control dirDDBox; license not found.
Line 83: Property OleObjectBlob in dirListBox could not be set.
Line 83: Cannot load control dirListBox; license not found.
Are dirDDBox and dirListBox shipped with VB6? or belong some other control that need register?
After I run VB6Cli.exe utility, still got the same error.
Can anybody help me. Thanks a lot.
|
|
|
|
|
Try asking at the Visual Basic Messageboard[^] instead, this is for C/C++/MFC.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Sorry, put in a wrong place.
|
|
|
|
|
No problems, happens to the best of us.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
|
|
I have seen a few posts which didn't share enough details about the subject to get a usefull answer but wow, hey, this one tops them all.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Or maybe this is some sort of Zen question from which you can create 10000 questions by knowing the real meaning of what t means.
|
|
|
|
|
Could be, i already have one of those 10000 questions in my mind: "What the hell does he mean by 't'?"
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
|
#include <iostream.h>
struct structA
{
int iMember;
char *cMember;
};
int main(int argc, char* argv[])
{
structA instant1,instant2;
char c = 'a';
instant1.iMember = 1;
instant1.cMember = &c;
instant2 = instant1;
cout << *(instant1.cMember) << endl;
*(instant2.cMember) = 'b';
cout << *(instant1.cMember) << endl;
getchar();
}
|
|
|
|
|
wbgxx wrote: char c = 'a';
-here you make c equal to 'a'
wbgxx wrote: instant1.cMember = &c;
-here you make the cMember pointer of instant1 point at the variable c, so instant1.cMember now contains the memory location of c
wbgxx wrote: instant2 = instant1;
-here you copy the contents of instant1 into instant2, so the members in instant2 (iMember, cMember) will contain the same values as the corresponding ones in instant1. This means, instant2.cMember now also points at your c variable, both instant1.cMember and instant2.cMember contains the memory address of the variable c.
wbgxx wrote: cout << *(instant1.cMember) << endl; -here you say "print out the value that is stored in the memory location pointed at by instant1.cMember", this memory location happens to be c's, and since you set c to 'a', it will print 'a'.
wbgxx wrote: *(instant2.cMember) = 'b'; - here you say, "copy the value 'b' to the memory location pointed at by instant2.cMember", which is -as you remember- the same as instant1.cMember, the address of your c variable.
wbgxx wrote: cout << *(instant1.cMember) << endl; - here you say now, "print out the value that is stored in the memory location pointed at by instant1.cMember" again, but since this memory location is the same as the one stored in instant2, and previously you changed the value stored in that memory location to 'b', it will print 'b'.
This is basic pointer stuff, i recommend reading some good books or checking out online tutorials about pointers in C/C++...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
When you do instant2 = instant1; it does a bitwise copy.
This means instant1 and instant2 will be exactly alike.
Which means the address pointed to by instant1.cMember and instant2.cMember will be the same.
And so changing the value using any of the pointers will reflect in both the pointers.
This is a classic example of why we need a copy constructor and assignment operator.
|
|
|
|