Well, in either case he obviously takes criticism well. Anyway, I think it's good to be like that: he speaks (or rather, types) his mind instead of trying to be modest. Modesty is overrated. He also admits when he's wrong. I try to be like that.
Smart people tend to be like that. Theo de Raadt and Linus Torvalds are excellent examples.
And yeah, he is a good programmer; that much is clear if you've communicated with him for five minutes.
and WTF is with the global variable thing, can anyone tell the theory or something.
Quite simply, anything, data or code, defined at the global scope, that is, outside any class/struct and function, is a global, and can be accessed from anywhere in the program as long as it's been declared. Global objects are static data, and the call to main() is between their constructor and destructor calls. See http://wiki.osdev.org/C%2B%2B#Global_objects for an example of what it looks like.
if so, how do you work with others then?
I compensate with my intellect and extreme good looks.
But seriously, though, I don't see what one thing has to do with the other.
I would like to say sorry to everyone who posted here. Especially to helios, for dumping on him when I should have been taking his criticism more maturely.
I'm also glad some people actually know what my program is supposed to do. I know it's a crappy start, but at least it's something, working or not. I guess it's Eng-gramming (programming in English) :P
I'm going to rephrase my question, starting at simple stuff.
How can I do something when the mouse is clicked? Believe me, I've Googled this thing so much, but all I see it how to simulate a mouse click, not how to handle on. Say I want to click somewhere on the screen. It doesn't matter where. When the user clicks their mouse (left mouse button) it prints "You clicked your left mouse button!". I'm going to use this for my gun shooting thing.
Thanks, sorry if this is a noobish question. I understand that C++ isn't an event driven programming language?
@OP: Bazzy was serious. Mouse control is high-level stuff. Even in languages like Java, mouse control is part of the higher libraries and systems. When you can pull off programs with self-written templates I'll get back to you.
No C++ is not event driven. I would say it's a mixture of structural and OO paradigms.
As you said in the last post of this question (I recognize it) you have no programming knowledge whatsoever. I've been at this for 2 years and I'm still mastering templates. So if you plan on getting to that anywhere fast, get ready for a long ride, because you aren't ready to handle mouse events yet.
In addition to what tummychow said... mouse events are API specific, meaning it's a bit different on each OS. So in that light handling a mouse click is something you'd have to look up as part of the OS you're writing for. on windows if it's a button you'll get a window message through your message pump. but I agree it's a high level concept since the data flow goes outside of your own program and there's a lot more that could happen.
I'm just going to put this project aside... Probably forever, I think I'll stick to web programming. C++ is a great language, but it's VERY complicated. I never thought that something so simple in JavaScript could be so difficult in C++. Oh well :P
Keep in mind that JS is designed to work with web integration, like Flash and Shockwave, and so it naturally would be designed to handle higher-level event input. C++ starts at the console level and consoles are not about to go into mouse input (although they can).