User Profile
Daniel E. Welch
- Guy / 21
- Pamplin , Virginia
- Offline for: 1y 11mn 1w 58m 43s
- Joined: Dec 27th, 2007
Orientation: Straight
Not Subscribed
Not Subscribed
- MOVIES
- Big fish
- FORREST GUMP
- MUSIC
- Ashes Remain, Disciple, Pillar
- Red, Toby Mac, Skillet
- Relient K, Family Force 5, Hawk Nelson
- Anberlin, Breaking Benjamim, Queen
- KJ-52, John Reuben
- BOOKS
- Left Behind (series)
- Running Loose
- Series of Unfortunate Events
- Harry Potter
- Artemis Fowl
- TV
- Castle
- Lost
- DRINKAGE
- moar dr. pepper
- Water
- Dr. Pepper
- INFLUENCES
- my LORD and savior, Jesus Christ
- my beloved; who I have yet to meet
Blog
something like peasantquest!
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...
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".
May 30, 2008 . 10:07:14
+zedman
Is In Your Base, Killing Your Mans
Greetings!
~ProSI
General Rioter
Hello ungreeted rioter!
---
...and i liked it.
ѻIrishancest
Legally Certified Warthog Operator
Woohoo for school being over. Glad the strcmp helped. Hope your internet gets a bit better as well. And enjoy vacation.
---
Grab a Shotgun, Go in Style, Relax and Smile
Come Riot over in Napalm Chat: http://chat.napalmriot.com/
~6od53nt
Has A Giant Miniature Space Hamster
Hey! Internet's been freezing up for me for the past few days so it's been hard to keep in touch with anyone!
anyway. I've been taking shots at strings and such every now and again. strcmp really helped me out a lot, can't believe I didn't remember it.
summer vacation just started for me today, and I've been sweeping up some loose ends!
---
9 times out of 10, it's probably Facebook worthy.
ѻIrishancest
Legally Certified Warthog Operator
Hey, how's life treating you?
---
Grab a Shotgun, Go in Style, Relax and Smile
Come Riot over in Napalm Chat: http://chat.napalmriot.com/
$spot
Supreme Commander
Yo mang!
---
"This is no time for ease and comfort. It is time to dare and endure." - Winston Churchill
+Annath
Wipes Groups For Fun
I just beat the vinci campaign about a week ago. AHven't played much since, as my time is taken up by AP classes and such.
---
Ask me about why I was Caboose long before Red vs Blue
~6od53nt
Has A Giant Miniature Space Hamster
I've been working through the Vinci Campaign for the past month.. I'm slow...
---
9 times out of 10, it's probably Facebook worthy.
Join the riot!