Overclock.net banner

1 - 4 of 4 Posts

·
Registered
Joined
·
3,735 Posts
Discussion Starter #1
Ok so next week it'll be 3 months since I started dating my GF and I wanna give her something. I was thinking of a small program (maybe coded in C) that would draw a heart in ASCII, with a small message in the center and after that, a small poem or message, I don't know.

Unfortunately I'm not great at programming yet, so I'd like that someone could help me to code this.

If there's anyone willing to, please PM me so we can discuss the project. There will be cookies
wink.gif


Please OCN! Help me make my GF happy n.n
 

·
Registered
Joined
·
3,735 Posts
Discussion Starter #3
She's not that kind of girl. She's geeky and the last two months I couldn't give her anything when we achieved a month together even though I took her to the movies multiple times and went out to have dinner (I paid).
 

·
Software Developer
Joined
·
7,231 Posts
Quote:
Originally Posted by Icekilla View Post

She's not that kind of girl. She's geeky and the last two months I couldn't give her anything when we achieved a month together even though I took her to the movies multiple times and went out to have dinner (I paid).
Do you have a compiler for C, or was that just a language you have heard of?

If thats the case, and you are on Windows (not Linux) do this in Java (its all free, even the tools.) Its not very hard to learn, and I can give you a hand.

First install the latest JDK (doesn't have to be EE version). Java Developer Kit, 1.7 update 4 is the latest. Make sure to install x86 and x64.

After those download install, we are going to pick an IDE, simply as they are less intimidating than programming in a command prompt. I recommend a very light weight utility called Jgrasp. Its a fully functioning IDE without all the meaning less bells and whistles of Eclipse.

We can start with making a heart in Command Prompt appear, I should be available for code examples for you to try out, and a command line prompt turned into a .bat so when its finished you can just make your girlfriend double click. I will have to continue this tomorrow, not tonight, get the tools I described setup. You can start by looking up "Java" +"Hello World" on Google for code examples.

You simply start Jgrasp up, create a new Java file, and begin typing example code in this function/method:

Code:
public static void main(String args[])
Code:
{
Code:
}
^ code goes between the { }

Print Line Examples:

System.out.println("Hello World");

^ This prints to screen/console everything in quotes.

If you want to add things after what you printed:

System.out.print(" and this is more text");

If you want to put in a blank line:

System.out.println("\n");

A full example:

Code:
public static void main(String args[])
Code:
{
Code:
System.out.println("Hello World\t");

System.out.print(" and this is more text");

System.out.println("\n");

System.out.println("I am a l33t hacker.");

Code:
}
When you are done, you simply click the Play button (which is Build / Compile then Run), and it you will output whatever you did to the console right below the text.

All of that should print happily in the screen. The slash T (\t) stands for tab, and \n stands for new line. They still have to be in quotes even though they are technically code for different things. I know its not a lot, but you would be amazed what you can do with some simple ascii text, such as ascii art, all displayed in the console.
 
1 - 4 of 4 Posts
Top