Be a Supporter!
Response to: C++ pointer, crash to desktop? Posted May 9th, 2005 in Programming

You might want to include this in your code:

Either

#define WIN32_LEAN_AND_MEAN
or
#define VC_EXTRALEAN

Here's a MSDN site to explain it MSDN

It basically doesn't include headers that are usually not used from the <windows.h> header.

Response to: Awesome compression idea. Posted May 5th, 2005 in Programming

At 5/5/05 04:33 PM, Lilj wrote: If you ever get it working, I'll be glade to test it.

Do you have the massive amount of computing power that would be needed?

Response to: C while switch loop Posted May 4th, 2005 in Programming

Ok let's do a simple breakdown of the while loop....

In C, in an expression, any number other then 0 is considered true. For example...

while(Value)
{
printf("I'm True if Value is not equal to one and I keep looping!");
}

or you can do it the other way

while(!Value)
{
printf("I'm true if value is equal to zero because the ! means not in C!");
}

Now the good ol' switch case.....
the basic template is this

switch ( expression )
{
case value_1 : statement
............................................
default : statement
}

The expression can be anything that gives (or returns which means you can even put a function in here!) an integer value; such as a long, int, double, or a char. Let me give an example..
(Note I didn't want to make a great UI at all)

int menu_choice=0;
printf("1 for this, 2 for that, 3 for what?");
scanf( "%d", &menu_choice);
switch(menu_choice)
{
case 1: printf("This!");
case 2: printf("That!");
case 3: printf("What?");
default: printf("Wrong value!!!");
}

My C might be a little broken, haven't used it in awhile.... but hopefully that clears it up for you.

Response to: Awesome compression idea. Posted May 4th, 2005 in Programming

At 5/4/05 07:16 PM, F-13 wrote: Just forget it dude, your idea would never work.

You're thinking of enhanced rainbow tables, wich really suck anyways. I think you're just better off finding some other way of compressing a file. I can't think of anything cool right now, but all I know is that your idea is impossible. I mean any checksum algorythm has collisions. You would probably end up creating bad files because of them.

Stop argueing your super-duper idea. It won't work.

I wouldn't say it would be impossible, but it is highly highly highly improbable. Also F-13, he's saying that a way around the collisions is to say that following a certain algorithm, it would be the nth or so collision. It would take a lot of computing time in order to actually do this, and I'm not sure how it would work in programming.

Response to: How do u make maze games Posted May 1st, 2005 in Programming

You need to give some more information....
What programming language are you going to use?
Is it going to be making the actual maze or is it just so that people can go through a maze?

Response to: Programming Awards! Posted April 28th, 2005 in Programming

How about a person that only gives an explanation on one thing? IE this... A crap program to capitilize and uncapitilize letters?

Response to: C++ cd drive Posted April 24th, 2005 in Programming

At 4/23/05 08:01 AM, batch69 wrote: Hey there. Is there code to open up the cd drive wen i run the exe i have tried google but to no effect plz help.

Google it better..... 4th result from my search...

Response to: VB: can anyone read the code in... Posted April 10th, 2005 in Programming

If the code is compiled, then the code can be read by a program in assembler language. This in VB code is impractical because VB is a bloated language and it would take the dissambler a long time to make relevance to your code. If the code is instead in a string in your code and is not actually compiled, then there is a good possibility that it could be read by something as simple as a hex editor. Way to stop it? Make a program that reads a text file of the code, and then encrypts it (there's several easy bit-wise manipulations to use if you want, not as protective, but easy to implement).

Response to: Why the left will lose again. Posted April 3rd, 2005 in Politics

The left existed before the Bush administration.

Response to: Not allowed to Protest? Posted March 30th, 2005 in Politics

It is irrational for them not to allow protestors. If they are afraid that the insurgents will attack the protestors then let them attack the protestors. This will only allow countries not involved with the safety and security of Iraq to intervene in Iraq; the negative viewings of America in Europe on Iraq will be lessened due to a shift of blame from America to the insurgents. So my question to the Iraqi leaders is, why not protest?

Response to: Baby Murdered Against Mother's Wish Posted March 28th, 2005 in Politics

At 3/22/05 12:35 AM, MembrsOfBushWhackers wrote: I'd probably be pretty crazy if the goverment killed my kid. Besides, since when do we make decisions about who has the right to live based on who their parents are? What's next? Sending murderers sons and daughters to the electric chair?

The fact is the goverment killed a child because the mother was poor and couldn't pay the medical bills. I'm not no religious republican, but I'm disgusted by this, I'd like to know why there's no disgust from the pro-lifers? Why does a woman that's been brain-dead for 15 years deserve more rights then a 6 month old?

I know this is from the first page, but I haven't delved into this topic with vast misconceptions by the majority of the people yet. This child that was 6 months old had a severe case of dwarfism. This basically meant that all of his appendages, as well as lungs, were very very small. This child could not live, and it was merely mercy for allowing this kid to pass away to a better place. The mother simply could not comprehend this. In order for the state(Texas) to decide what to do medically to a child without the parent's permission it has to go through an entire slew of paperwork, involving numerous doctors AND an ethics commisioner at the hospital. So whether or not the child could survive has been contemplated by numerous amounts of professionals.

For Schiavo's case, it's been in the American back burner of news for the past 15 years, that's why it's a big deal now. As well as that, there are several professionals that wanted further testing on Schiavo to try and rehabilitate her.

Response to: Consoles Posted March 24th, 2005 in Programming

At 3/24/05 01:23 PM, chellow wrote: Ok i know that a lot of commercial games are written in c++.

So if i got it and made a game with it, would i have to get anything else to make it so my friend (he doesnt have a computer only the consoles,) can play it on his PS2 of whatever, or can i do that in the c++ program?

Short Answer: No, you as an individual most likely can't.

Response to: Suggest a way to "fix" S.S Posted March 9th, 2005 in Politics

At 3/9/05 10:19 PM, IllustriousPotentate wrote: Plunge the government into massive deficit spending and hope that the economic ramfications don't hit until after we're dead.

That's what will be done, anyway.

Eh, too bad that's what they're doing now, so the ramifications are coming if we don't do anything.

The way to fix social security? Stop the government from taking from the social security surplus we currently have (yes we do have a SS surplus). Use the money that comes from social security solely for social security and not other government programs. Also, a good portion of this money should be given back out to banks to be used as loans to consumers and businesses, and paid back with interest of course. So this means that the money does not sit idly in the Treasury, and is instead promoting the growth of the American economy.

This seems rational to me, it solves the problem of the pyramidal scheme that people complain about the current system(the pay as you go), and it does not privatize social security, which the democrats are furiously against.

Response to: Very simple c++ problem Posted March 6th, 2005 in Programming

You forgot the "return 0;" at the end of your code.

Response to: US soldiers shoot Itailian hostage Posted March 6th, 2005 in Politics

At 3/6/05 06:45 PM, bcdemon wrote: Google Capt. Ronny Johnson for the full story.

It's been a year since that has happened, and the military probably has gotten their act together since then.

Response to: US soldiers shoot Itailian hostage Posted March 6th, 2005 in Politics

At 3/6/05 09:32 AM, bcdemon wrote: Incredible, some US soldier says they waved thier arms, used spot lights, and then fired warning shots before shooting the car. And most of you believe it as truth first hand.

So what do you say about what Sgrena said:

The car was travelling at "regular" speed.
And "there had been no warning from the U.S. forces"
And the fact that "It wasn't a checkpoint, but a patrol which shot as soon as it had lit us up with a spotlight. We had no idea where the shots were coming from."

I'd say she was a contradictory puta. "Lit you guys up with a flashlight" , "no warning".... hmm, something doesn't seem right here.


Raven, nice bumper sticker thingy, although stupid it did make me chuckle. And where do you keep getting this 70mph speed if Sgrena (who was in the car) says it was travelling at regular speed? Are you making up this number to help your arguement?

I got the 70 mph speed from the initial reports from one of the initial reports, and I'm currently trying to find that. Also let's look at a "regular speed", which I am quoting Sgrena. That would be 56 mph for an open road, or if she would've considered the road a motorway, that would approximately be 81 mph. So to approximate that her mental "regular speed" is about 60-70 mph seems very appropiate.

Response to: US soldiers shoot Itailian hostage Posted March 5th, 2005 in Politics

At 3/5/05 05:21 PM, bcdemon wrote: At 3/5/05 12:03 PM, Ravens_Grin wrote: No attempt at stopping or evading the shooting. Instead she was being given a nice story about what has been happening in Italy.
You make it sound like Bush listening to a tale about a goat while the WTC was being crippled.

"There was suddenly this shooting, we were hit by a hail of gunfire, and I was speaking with Nicola, who was telling me about what had been happening in Italy in the meantime, when he leaned towards me, probably also to protect me,"

She was obviously talking to Nicola prior to and as the shooting began. Unless you think they waited till the shooting started to discuss Italy. But I doubt you're that stupid.

I'm not as dumb as you. Obviosly the story was continuing even during the shooting, you dumb fuck. That is simply what I was saying.

Asked if the car was going too fast when the US troops opened fire, she said: "We weren't going particularly fast given that type of situation."
She acknowledges that she was going fast in this statement; she states that they had a reason to go that fast because of the "situation,"
She says they "we weren't going particularly fast given that type of situation". Meaning they could have been going faster than they were considering she was just released from insurgents.

So what if she was released from insurgents? Did they have a bumper sticker on the car saying that they just got released from insurgents so they could be going as fast as they fucking want? Hell no. The world is filled with stupid people, and these Italians were among one of them. It's still a violent place, with people trying to car bomb, and create uprisings. They were journalists, they should have known to take it easy near military checkpoints.

At 3/5/05 12:21 PM, night_watch_man18 wrote:
At 3/5/05 12:03 PM, Ravens_Grin wrote: Right now there are 2 groups with completely different political agendas.
You were bringing up a good point, but then you lost me when you said, "The other group is the US military. Here they stick by strict displines, and report what should have happened"... if you have ever done any reading outside of an American history textbook, you would know that the military lies... a lot. Yes, I agree with you that they -should- report what has happened, but because we only say "You should report the truth", they tend to bend that word quite often.

Eh, I get like that when I'm in a hurry to get onto the main point, sorry about that misunderstanding. But I did choose my words carefully when I was writing that sentence and I think you got what I was trying to infer.

:: : No attempt at stopping or evading the shooting. Instead she was being given a nice story about what has been happening in Italy.


Being told a nice story During the shooting? How could Nicola be telling her a nice story about Italy when he was dead?... or at least dying? Try not to twist the story around too much.

How could they tell the difference between an Italian and a car bomber when the vehicle was100-200 yards away?
A source would be appreciated on this figure, though you are right about the difference between an Italian car and a car bomber... (okay, should I just assume that the US was not informed that they were coming, given that they had just escaped?)

You should assume that the US was uninformed of the recent escapee. The 100 yards figure is what I'm guessing is the "safe" distance the US military would put out for a car speeding towards a checkpoint. It would take less then 3 seconds for a car to travel 100 yards if they were going 70 mph. So that's where I get that figure from. Simple mathematics, my friend, simple mathematics.


She acknowledges that she was going fast in this statement; she states that they had a reason to go that fast because of the "situation," even though they didn't think about anyone besides themselves going that fast. Like what I've been saying, what if that car was a car bomber? There is no WAY that the soldiers can know in a matter of 15-20 seconds when a car is speeding feverishly into the checkpoint.
Again, you make a good point, but could you provide the source where it says the 15-20 second warning? Much appreciated.

Again, simple mathematics, and a little bit of meteorology.
weather.com Right now the visibility at Baghdad is 6.2 miles. At the speed of 70 mph, if the soldiers saw them from this distance, they would have 5 minutes until the car reached the checkpoint. So to assume that they would at least have a 15-20 second time slot to be giving warnings to the oncoming car, which would be approximately 1500-2000 feet away, is quite feasible. (Actually I just rechecked that number, it is now down to 4.3 miles of visibility. Still that's 3.5 minutes until the car would reach the military checkpoint)

Response to: US soldiers shoot Itailian hostage Posted March 5th, 2005 in Politics

Right now there are 2 groups with completely different political agendas. One would be the Italians. If you read all of the reports you would realize that she was against the war and reporting it in a similar fashion. The other group is the US military. Here they stick by strict displines, and report what should have happened. Let me analyze what she said...

"There was suddenly this shooting, we were hit by a hail of gunfire, and I was speaking with Nicola, who was telling me about what had been happening in Italy in the meantime, when he leaned towards me, probably also to protect me,"

No attempt at stopping or evading the shooting. Instead she was being given a nice story about what has been happening in Italy.

She said the shooting continued "because the driver wasn't even managing to explain that we were Italian"

How could they tell the difference between an Italian and a car bomber when the vehicle was100-200 yards away? This is an irrational reasoning and the Italians provided no thought to their safety in a country riddled with violence.

Asked if the car was going too fast when the US troops opened fire, she said: "We weren't going particularly fast given that type of situation."

She acknowledges that she was going fast in this statement; she states that they had a reason to go that fast because of the "situation," even though they didn't think about anyone besides themselves going that fast. Like what I've been saying, what if that car was a car bomber? There is no WAY that the soldiers can know in a matter of 15-20 seconds when a car is speeding feverishly into the checkpoint.

Response to: US soldiers shoot Itailian hostage Posted March 5th, 2005 in Politics

Ok the time is 8:55 in the northern hemisphere. It is typically dark around this time. A startling fact about guns is that they make a large blast, and at night it is easily noticeable to where these blasts come from. Obviously if the Italian driver saw this and thought that it was possibly the insurgency, then he would turn around. Did he? Nah...

Response to: US soldiers shoot Itailian hostage Posted March 4th, 2005 in Politics

What if that car was a car bomber? How can the soldiers tell the difference? Why did the vehicle not slow down even after warning shots were fired? Was the shot into the passenger cabin to kill the people in it or into the engine block to disable the vehicle? Think about the situation and why people did what they did, and then come back to reality.

Response to: Super-Duper Image processing fun Posted March 1st, 2005 in Programming

Hmm... I'm going to try and make that in C++.... Hopefully I can get it in a week. I doubt it though because I'm going to be busy....

Response to: MPAA bullys Posted March 1st, 2005 in Politics

At 3/1/05 01:20 PM, fli wrote: Just because a few bought a DVD even if they have a pirated copy, don't mean that everyone is gonna buy a DVD even if they have a pirated version.

Your statement before was proven wrong, can you possibly provide evidence to prove this right?

"I've seen it. It's stupid. Let's download another movie." A sale isn't made, directly due to the fact that someone saw the movie for free.

Then is that really a bad thing? A better product for the consumers to get the people to actually purchase a product? Come on...

I'm starting the sense just a few persons, "Piracy, it's nothing big really." Well then, if it's nothing too big, then why not buy a legit copy?

A lot of people that do do piracy are in college and cannot afford to buy a legit copy. P2P has been normally rampant on college campuses for this sole reason, that people cannot afford it.

Response to: Bill Clinton is really an alien! Posted March 1st, 2005 in Politics

This guy is insane that made this website, 'nuff said.

Response to: MPAA bullys Posted March 1st, 2005 in Politics

At 3/1/05 03:42 AM, fli wrote: People whom download movies or music do not need to buy the movie since they already have them.

Truly false statement. I personally bought the movie "Half Baked" shortly after I bought it. Why? The copy that I got was decent, but not great quality. As well as that, I wanted all of the bonus features that was on the DVD.

The funny story about this, Columbia Pictures had my ISP take my internet taken away from me for 2 days, even though I bought the DVD. Downloading the DVD influenced me into purchasing the DVD, and there was no logical reasoning to have them shut my internet off.

By the way, this was about a year and a half ago, before this crackdown started with the MPAA.

Response to: C++ Codes Here! Posted February 28th, 2005 in Programming

eh, hopefully he's a fast learner

Response to: Flash (Swf) To Dvd Software Posted February 24th, 2005 in Programming

I would use Adshareit swf to video, then from there I would use Nero or another program that is capable of putting a video file into a dvd format.

Response to: C++ Codes Here! Posted February 22nd, 2005 in Programming

Can someone give me a kinda complex project (besides a game engine) so that I can get my C++ skills back up to speed?

Response to: C++ Codes Here! Posted February 21st, 2005 in Programming

At 2/12/05 12:04 AM, eh-productions wrote:

:...: goto begg;

}else{
if(guess == guesser){
cout<<"Correct, Would you like to play again? Press 1 for yes and 2 for no"<<endl;
cin>>yesno;
if(yesno == 1){
goto rewind;
}else{
return 0;
}
}
}
}
}
}

hey eh, generally do not use goto statements in C++. Try rewriting that using either a while statement or a for statement

Response to: C++ Codes Here! Posted February 21st, 2005 in Programming

At 2/21/05 07:35 PM, Love_Daddy wrote: not bad dude thanx for the info!

thanks... oh by the way I just thought of a quick and easy way to make sure you don't and a character like a period, semicolon, or what not... and I found a horrendous typo in which I should've caught, which affects the to_upperr function.

the changes are to the to_lower and the to_upper functions...(adding spaces for clarity)


char to_lower(char x) /* NOTE: when doing functions, it only passes a value, so it's perfectly legal to do what I just did*/
{
int lower_constant= 32; // the decimal value of 11011111
if( ( ((int) x >= 65) && (((int) x) <= 90) ) || ( ((int) x >= 97) && ( (int) x <= 122)))
{
return (x | ((char) lower_constant)); }
else{

return x;
}
//eh, I'm lazy. it's going to pass this value back anyways so I don't need to store it in a variable, also | is the operator for or.
};

char to_upper(char x)
{
int upper_constant= 223;
if( ( ((int) x >= 65) && ((int) x <= 90) ) || ( ((int) x >= 97) && ( (int) x <= 122)))
{ return ( x & ((char) upper_constant)); } // ^ is the operator for XOR, and not for power stuff, so with that, this would not be valid 2^3=8. That is not true in this case.
else
{
return x;
}
};

Response to: C++ Codes Here! Posted February 21st, 2005 in Programming

Here's something that will change text into ALL CAPS, and another function that will change it into no caps. I know there's probably a function in the library to do this, but I will explain the actual concept behind this. (Well actually it will only do one letter at a time, and it does not account for other ASCII characters like 1,2 ,3…. And ‘,’ ‘.’ and ‘\’)

As everyone knows here, computers run in binary, 0's and 1's. If you do a sizeof(char); you will realize that an ASCII character takes up only 1 byte, 8 bits, or 256 possible combinations of 0's and 1's(2^8).
Now for text like what you are seeing, it takes up about 42 characters, including all caps and lower case.
Let's examine the letter 'a' in binary and the letter 'A' in binary as well... but let's disect it using some code...

ok so how in the world are we going to get the binary value of 'a' and the binary value of 'A'? Well we could just look it up in an ASCII chart, but that would be a little too easy. What we could also do is to do a type of "conversion." C++ has an easy way to do a quickie conversion in which in a function you put in paranthesis around the type you want the variable to be real quick. Don't understand? Well look at the code below and try to understand.

#include <iostream>

int main()
{
char x='A';
char y='a'; /* ok, I could've just called these variables a and A because c++ is case sensitive, but oh well */
std::cout<<(int) x<< "/n"<< (int) y;
return 0;
};

Notice how I put paranthesis around the type that I wanted the variable to be? Try it without the paranthesis. It won't work. It's because your trying to redefine the variable, and not just view it as a type integer.

You should get 65 decimal for the lowercase a and 97 decimal for the uppercase A. Just to make this shorter, I'll just convert this to binary. (If people really want me to explain, I will)

A= 01000001
a= 01100001

As you can see, only 1 "1" changed the value of a lowercase a to an uppercase A. You can do this for the entire spectrum of values, but let me just say the first 3 letters of the binary values will stay the same throughout the alphabet, with z being 01011010 and Z being 01111010. So now how do we change it to all caps or to no caps at all? Easy, just figure out a way to change that little 3rd bit in the values.

So now we have to manipulate the values of the binary code. Once again c++ gives us the power to do this. We have the AND function, the OR function, and the XOR function. Let me give an example of each(remember this is in binary, in which 1 is true and 0 is false)....
AND--- 0 & 1 = 0 1 & 1 = 1 1 & 0 = 0
OR-- 1 | 0 = 1 1 | 1 = 1 0 | 1= 0
Exclusive or (XOR) 1 ^ 0 = 1 1 ^ 1 = 0 0 ^ 1= 1

^, &, and | (which is below the backspace on the keyboard and it looks like two vertical lines) are like +, *, / signs in math. They all resemble an operation. (God I hope this isn't too long....)

So if we OR a char and a char type, it would do similar operation bit by bit.
01100001 ( which is lowercase a, or 97 in decimal)
OR 00100000 (223 in decimal)
01000001 ( which is uppercase A, or 65 in decimal)

So that's how we switch from lower case to uppercase. We use the XOR to get lowercase....
01000001
XOR 00100000 (which is 32 in decimal)
01100001

So finally now in C++ (only does one char at a time, so needs to be rewritten to do an entire string.....)

#include <iostream>
using namespace std;

char to_lower(char x);
char to_upper(char x);

int main()
{
char y;
while(1)
{
cin>>y;
cout<< to_lower(y) << "\n" << to_upper(y) << "\n";
}
return 0;
};

char to_lower(char x) /* NOTE: when doing functions, it only passes a value, so it's perfectly legal to do what I just did*/
{
int lower_constant= 32; // the decimal value of 11011111
return (x | ((char) lower_constant)); //eh, I'm lazy. it's going to pass this value back anyways so I don't need to store it in a variable, also | is the operator for or.
};

char to_upper(char x)
{
int upper_constant= 32;
return ( x ^ ((char) upper_constant)); // ^ is the operator for XOR, and not for power stuff, so with that, this would not be valid 2^3=8. That is not true in this case.
};

Comments, questions, concerns???