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... ![]()

Comments
ʊIrishancest
Legally Certified Warthog Operator
Beware. The Internewt is real!
I'll have a loil, on the rocks.
Come Riot over in Napalm Chat: http://www.napalmriot.com/chat/
ɤ6od53nt
Casts Magic Missile
It was a great help. for one thing, I'm being too slow today to remember strcmp(). I looked it up and made myself feel pretty much dumber than I already had been feeling today. Another thing, yes, it returns 1 if true, and pretty much any number BUT 1 if false. I have yet to figure out any pattern to what none "1" number the program picks.
"For the Glory of my LORD God!" --outcome of my first program
ʊIrishancest
Legally Certified Warthog Operator
Beware. The Internewt is real!
I'll have a loil, on the rocks.
Come Riot over in Napalm Chat: http://www.napalmriot.com/chat/
ʊIrishancest
Legally Certified Warthog Operator
Beware. The Internewt is real!
I'll have a loil, on the rocks.
Come Riot over in Napalm Chat: http://www.napalmriot.com/chat/
ɤ6od53nt
Casts Magic Missile
6od53nt == noob!!
"For the Glory of my LORD God!" --outcome of my first program
ʊIrishancest
Legally Certified Warthog Operator
Beware. The Internewt is real!
I'll have a loil, on the rocks.
Come Riot over in Napalm Chat: http://www.napalmriot.com/chat/