Forum Settings
       
Reply To Thread

C# programming help; for god's sake help meFollow

#1 Sep 03 2006 at 12:30 AM Rating: Decent
**
261 posts
Hey ya'll

I'm trying to make an ASCII converter program for school and it needs to have 3 different methods. Don't laugh but here's my newb program:




using System;
using System.Collections.Generic;
using System.Text;

namespace ASCIIWeek4
{
public class Crypto
{
string input;
string value;
string symbol;
public string getInput()
{
int input;

Console.WriteLine("Enter a character: >");
input = Console.Read();
return input;
}

public char convert(string input)
{

int value;

value = Convert.Parse(symbol);
}

public void displayMessage(char letter)
{

Console.WriteLine("The AscII value of your character: " + (char) value + "is" + value);
}
public static void Main(String[] args)
{
return;
}
}
}




I asked my teacher for help and he responded:


"Comments:
Hi, not to worry, I understand. So the problems here are that you have to return the values you read in. For example in the getInput, you're reading into "input" but you're returning "symbol". Also, all of those variables shouldn't be declared globally. You should only declare the variables you need in the methods locally. The convert method, should just be a char.Parse(symbol) and return a char value (as you see in the return value). Then lastly, in the main method, you should have what was shown before in the sample program, but commented out and then changed to your method of naming."



I understand what he's saying (mostly), but I don't know what to change ; ;




I keep getting 3 errors when i debug they are:



Error 1 Cannot implicitly convert type 'int' to 'string' C:\Documents and Settings\USER\My Documents\Unzipped\ASCIIWeek4\ASCIIWeek4\ASCIIWeek4\Program.cs Line:18 Column:20 ASCIIWeek4


Error 2 'System.Convert' does not contain a definition for 'Parse' C:\Documents and Settings\USER\My Documents\Unzipped\ASCIIWeek4\ASCIIWeek4\ASCIIWeek4\Program.cs L:26 C:29 ASCIIWeek4


Error 3 Cannot convert type 'string' to 'char' C:\Documents and Settings\USER\My Documents\Unzipped\ASCIIWeek4\ASCIIWeek4\ASCIIWeek4\Program.cs L:32 C:67 ASCIIWeek4





I am using microsoft visual C# express 2005.
Can anyone tell me what I am doing wrong here and tell me how to correct it. My stress headache is KILLINE ME! lol

Thanks in advance
clueless ~B
#2 Sep 03 2006 at 12:59 AM Rating: Decent
BeamerB wrote:
I understand what he's saying (mostly), but I don't know what to change
Your major.
#3 Sep 03 2006 at 1:07 AM Rating: Decent
**
261 posts
ok that was funny lol,
but seriously anybody able to help out please?

(And I did mention it was a newb program lol)
#4 Sep 03 2006 at 1:20 AM Rating: Decent
@#%^ing DRK
*****
13,143 posts
Follow this link. They're much more likely to solve your problem than the pack of wolverines here~
#5 Sep 03 2006 at 1:21 AM Rating: Decent
**
261 posts
Thank you very much ^^
I appreciate the help.
#6 Sep 03 2006 at 1:24 AM Rating: Decent
Seriously, It will be easier on everyone if you just drop out now.

Your teacher told you exactly what was wrong and if you had been paying attention in class at all you would know how to do this. I actually typed up the correct version of your program but decided not to paste it.

I spent a lot of my time in college helping jackasses like you and you want to know what my reward was? Those cnuts graduated and landed jobs and now I have to deal with their cnutery on an every day basis at work.

GFY.
#7 Sep 03 2006 at 4:49 AM Rating: Decent
Ministry of Silly Cnuts
*****
19,524 posts
BeamerB wrote:
Can anyone tell me what I am doing wrong here and tell me how to correct it.
Erm, well you should have posted it elsewhere, and probably in a different format.

Might I suggest you revert to routine and take a marker pen to the end cubicle of the local public toilets and scrawl "Will blow and swallow. Dial xxx-xxx-xxxx and ask for BeamerB. Older men preferred"

Alternatively, you could just fUck off and die.

Hope that helps
____________________________
"I started out with nothin' and I still got most of it left" - Seasick Steve
#8 Sep 03 2006 at 6:38 AM Rating: Default
Cause self-deprication evokes sincerity. >.> Don't appreciate that much, at least b/f annoucing with more pride the display of your nobby knees. And yeah, notice the quintessential pretension which fails to directly address your problem. That's the fine line b/t 6-figure modeling for ya. Puckering stability which will last how much longer than outsourcing??? There's no html guide to posting on this site precisely b/c such "knowledge" is perceived as guarded "treasure". Helped yet?
#9 Sep 03 2006 at 7:55 AM Rating: Decent
****
5,135 posts
Although I don't know C# yet looking at your program and your teacher’s response it seems pretty simple to figure out the problem.

In short, you're a fUcking idiot and you should change your major to grave digging.

#10 Sep 03 2006 at 8:54 AM Rating: Good
***
1,239 posts
Nevermind. :( RESOLVE/C++ is apparently very different.

Edited, Sep 3rd 2006 at 12:33pm EDT by jeffoncom
#11 Sep 03 2006 at 2:34 PM Rating: Default
Wow, CrescentFresh he was asking for help, not a firing squad. We dont need your emo plee for why the people you helped got laid/had fun while you were jerking it to code in a small corner.

Edited, Sep 3rd 2006 at 3:47pm EDT by Fuzzycheese
#12 Sep 03 2006 at 2:37 PM Rating: Decent
Ministry of Silly Cnuts
*****
19,524 posts
Fuzzycheese wrote:
Wow, CrescentFresh he was asking for help, not a firing squad. We dont need your emo plee for why the people you helped got laid/had fun while you were jerking it to code in a small corner.
FUck Off you cUnt
____________________________
"I started out with nothin' and I still got most of it left" - Seasick Steve
#13REDACTED, Posted: Sep 03 2006 at 2:42 PM, Rating: Sub-Default, (Expand Post) awww, I'm glad when you get mad you express yourself with negative conotations. Go watch Dr Phil maybe then you'll be able to keep more then a blowup doll.
#14REDACTED, Posted: Sep 03 2006 at 2:44 PM, Rating: Sub-Default, (Expand Post) Wow, what a douch bag. Just cause you ahve a small ****, doesn't mean you can take it out on anyone eles.
#15 Sep 03 2006 at 2:46 PM Rating: Decent
Fuzzycheese wrote:
WeI dont need your emo plee for why the people you helped got laid/had fun while you were jerking it to code in a small corner.
I'm pretty sure you tried to insult me but I'll be damned if I can make sense out of it. Can anyone translate cunt?
#16REDACTED, Posted: Sep 03 2006 at 2:46 PM, Rating: Sub-Default, (Expand Post) I do believe that is what you are speaking fluently
#17REDACTED, Posted: Sep 03 2006 at 2:51 PM, Rating: Sub-Default, (Expand Post) Now while you're obviously working hard at your job, I've got your swingline stapler.
#18 Sep 03 2006 at 2:51 PM Rating: Decent
Quote:
I do believe that is what you are speaking fluently

Edited, Sep 3rd 2006 at 3:55pm EDT by tremblingbloom
Let me know when you have finished the final draft of this literary masterpiece and I might take the time to give you a proper critique.
#19 Sep 03 2006 at 2:55 PM Rating: Excellent
Avatar
******
29,919 posts
Oh, by the way, Fuzzycheese, your ratebot tremblingbloom was just involved in a near fatal karma accident.

Lose the sock.
____________________________
Arch Duke Kaolian Drachensborn, lvl 95 Ranger, Unrest Server
Tech support forum | FAQ (Support) | Mobile Zam: http://m.zam.com (Premium only)
Forum Rules
#20 Sep 03 2006 at 3:07 PM Rating: Default
Deny me sending the solution, oh well. Catch yall at the star trek convention again this year?
#21 Sep 03 2006 at 3:30 PM Rating: Good
jeffoncom's sig wrote:
BarkingTurtle wrote:

so sodomizing one's self with a soda bottle isn't an entirely unnattractive way to spend a Saturday night.


Despite my inability to remember writing this I am totally convinced that I did at some point. In any case, rate-up Jeffoncom for your patronage.
Reply To Thread

Colors Smileys Quote OriginalQuote Checked Help

 

Recent Visitors: 201 All times are in CST
Anonymous Guests (201)