something like peasantquest!
- May 30, 2008 - 10:07pm
- Mood: it's Friday, schools almost over. I'm happy!
- Playing: Napalmriot
- Watching: reflection on compy screen (or news to be technical)
- Listening: KUTLESS!
- Reading: scarlet letter doesn't count
- Drinking: gatorade
- Eating: cereal
Hey! It's been a while since I updated the community on my C progress. I thought I'd jump in here and say a bit. I was toying around with strings and decided to test equivalences between a set string and an inputted string. something like this (assume variables are previously assigned):
strgcpy(strg1,"yes");
scanf("%s",&strg2);
if (strg1 == strg2)
{
printf("success");
getchar();
}
else
{
printf("failure");
getchar();
}
my guess is that it won't work because I'm not accounting for the null character that is automatically used to end a set string. I dunno, it could be something else. If you know off the top of your head, feel free to tell me. btw, since I'm still new to C and C++ I use the getchar() function to temporarily pause the program. I don't know any other way to do it. Nor have I figured out exactly what the getchar() function is for besides a literal keyboard/mouse scanf(). I'm assuming it's like getkey on the calculator, but I haven't gotten far enough for it to matter.
another thing, what this has to do with peasantquest. As some or all of you may know, peasantquest is based on text input directions. to pick something up, you literally type "take stick" or "take baby".
I wanted to see if I could develop a minor search engine of sorts. Something that will discern between what matches the inputted text and what doesn't. That was the first step, and i got shut down... ![]()
Physics egg drop!
- March 24, 2008 - 11:02am
- Mood: apathetic
- Playing: C++ code
- Watching: compy screen burn holes in my eyes
- Listening: SANDSTORM!!
- Reading: "conversion of temperature" mathisfun.com *yay coding*
- Drinking: I wish
- Eating: I wish
Sooo... if anyone has had a physics class before, and a lab was to drop an egg off the side of the school... HOW'D YOU DO IT?!
btw, my class only gets 5 sheets of computer paper and 1 meter of masking tape. So, is anyone creative enough to think about this?
So far, my group has come up with failing ideas. Cones are too aerodynamic to work. Plus, they just flip over and the egg rolls out and smashes against the ground unprotected... If anyone would care to help, it'd be appreciated.
