-
April 22nd, 2011, 01:29 AM
#1
Help writing a code. Please!!!
Ok I'm writing a code because the girl I'm going to ask out is very much a closet computer programmer. I, however, am C++ inept. I guess she uses microsoft visual studio mainly. I wanted to write a code asking her out. I know this is a bit cheesy, and not something you see on these boards everyday. So have a laugh at my cheesyness, and please help me out. I need to make this work!
Here was one that was previously written for me, but my friend said it didnt work.
#include <iostream>
int main()
{
char letters[] = " beilmnouwy";
int order[] = { 9, 3, 4, 4, 0, 10, 7, 8, 0, 1, 2, 0, 5, 3, 6, 2 };
for(int i = 0;i < sizeof(order) / sizeof(*order);++i)
std::cout << letters[order[i]];
std::cout << std::endl;
return 0;
}
I guess its a word scramble of some sort. I'm sorry I'm so lost when it comes to this. Any ideas new or added to this are appreciated.
-
April 22nd, 2011, 09:22 AM
#2
Re: Help writing a code. Please!!!
As far as I can see it should work (if the order is as it should be). What issues do you experience?
-
April 22nd, 2011, 11:44 AM
#3
Re: Help writing a code. Please!!!
Originally Posted by Vanek26goal
[...] but my friend said it didnt work.
Maybe he didn't mean that in a technical sense?
The code definitely does compile on VC++ 2010 and when run outputs a valid english sentence.
Ah, and... Welcome to CodeGuru!
... and good luck, anyway...
Last edited by Eri523; April 25th, 2011 at 06:25 AM.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
April 23rd, 2011, 02:31 AM
#4
Re: Help writing a code. Please!!!
We got the message.
Presume that your firend wants to see if you can get it as well, withouth the others help.
-
April 24th, 2011, 04:26 PM
#5
Re: Help writing a code. Please!!!
Can I ask what it spits out? And could someone add the name Kelsey into it?
-
April 25th, 2011, 02:17 AM
#6
Re: Help writing a code. Please!!!
You're not putting much effort into this. Are you sure this is the girl you want?
-
April 25th, 2011, 06:23 AM
#7
Re: Help writing a code. Please!!!
I can bet she's a gorgeous computer science teacher...
-
April 25th, 2011, 01:46 PM
#8
Re: Help writing a code. Please!!!
I taught myself some basic C++ skills. I think she will appreciate, though basic, that I put the time in to learn it myself. Thanks everyone for the help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|