unable to spot the error
-
if possible antbody help me... do no wat error it contains using System; using System.Collections.Generic; using System.Linq; using System.Text; class MainClass { public static void Main() { int tokenindex = 0; int cntTokens = 0; int iSymbol = -1; int prevDictSymbol = -1; char[] strToken = new char[512]; int i=0; string[] arr = { "Hello", "World" }; while (arr[0] != null) { tokenindex = 0; while ((arr[0] != ' ') && (arr[0] != ',') && (arr[0] != ';') && (arr[0] != '/') && (arr[0] != '#') && (arr[0] != '\0') && (arr[0] != '&') && (arr[0] != '-')) strToken[tokenindex++] = arr[0]; arr++; strToken[tokenindex] = '\0'; } Console.WriteLine(" The Token is:", strToken); Console.WriteLine("The Length of strToken", strToken); } }
the quieter u become more u hear
-
if possible antbody help me... do no wat error it contains using System; using System.Collections.Generic; using System.Linq; using System.Text; class MainClass { public static void Main() { int tokenindex = 0; int cntTokens = 0; int iSymbol = -1; int prevDictSymbol = -1; char[] strToken = new char[512]; int i=0; string[] arr = { "Hello", "World" }; while (arr[0] != null) { tokenindex = 0; while ((arr[0] != ' ') && (arr[0] != ',') && (arr[0] != ';') && (arr[0] != '/') && (arr[0] != '#') && (arr[0] != '\0') && (arr[0] != '&') && (arr[0] != '-')) strToken[tokenindex++] = arr[0]; arr++; strToken[tokenindex] = '\0'; } Console.WriteLine(" The Token is:", strToken); Console.WriteLine("The Length of strToken", strToken); } }
the quieter u become more u hear
-
hmmm.. compiler error
the quieter u become more u hear
-
hmmm.. compiler error
the quieter u become more u hear
-
if possible antbody help me... do no wat error it contains using System; using System.Collections.Generic; using System.Linq; using System.Text; class MainClass { public static void Main() { int tokenindex = 0; int cntTokens = 0; int iSymbol = -1; int prevDictSymbol = -1; char[] strToken = new char[512]; int i=0; string[] arr = { "Hello", "World" }; while (arr[0] != null) { tokenindex = 0; while ((arr[0] != ' ') && (arr[0] != ',') && (arr[0] != ';') && (arr[0] != '/') && (arr[0] != '#') && (arr[0] != '\0') && (arr[0] != '&') && (arr[0] != '-')) strToken[tokenindex++] = arr[0]; arr++; strToken[tokenindex] = '\0'; } Console.WriteLine(" The Token is:", strToken); Console.WriteLine("The Length of strToken", strToken); } }
the quieter u become more u hear
It's probably because all your code is in bold and not formatted correctly for review.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
if possible antbody help me... do no wat error it contains using System; using System.Collections.Generic; using System.Linq; using System.Text; class MainClass { public static void Main() { int tokenindex = 0; int cntTokens = 0; int iSymbol = -1; int prevDictSymbol = -1; char[] strToken = new char[512]; int i=0; string[] arr = { "Hello", "World" }; while (arr[0] != null) { tokenindex = 0; while ((arr[0] != ' ') && (arr[0] != ',') && (arr[0] != ';') && (arr[0] != '/') && (arr[0] != '#') && (arr[0] != '\0') && (arr[0] != '&') && (arr[0] != '-')) strToken[tokenindex++] = arr[0]; arr++; strToken[tokenindex] = '\0'; } Console.WriteLine(" The Token is:", strToken); Console.WriteLine("The Length of strToken", strToken); } }
the quieter u become more u hear
If you can't see the problem, you really need to drop the C# class your taking right now. Intellisense lights that code up like a freakin' Christmas tree.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
if possible antbody help me... do no wat error it contains using System; using System.Collections.Generic; using System.Linq; using System.Text; class MainClass { public static void Main() { int tokenindex = 0; int cntTokens = 0; int iSymbol = -1; int prevDictSymbol = -1; char[] strToken = new char[512]; int i=0; string[] arr = { "Hello", "World" }; while (arr[0] != null) { tokenindex = 0; while ((arr[0] != ' ') && (arr[0] != ',') && (arr[0] != ';') && (arr[0] != '/') && (arr[0] != '#') && (arr[0] != '\0') && (arr[0] != '&') && (arr[0] != '-')) strToken[tokenindex++] = arr[0]; arr++; strToken[tokenindex] = '\0'; } Console.WriteLine(" The Token is:", strToken); Console.WriteLine("The Length of strToken", strToken); } }
the quieter u become more u hear
BTW, this is the most frakked up homework assignment on the planet. Does your instructor really want you to use a character array to hold the extracted word? I rewrote your code so that it would work, but I don't know if I want to give it to you because it has the very real possibility of helping you pass the course, and I don't think we need another clueless programmer running around writing crappy code.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
BTW, this is the most frakked up homework assignment on the planet. Does your instructor really want you to use a character array to hold the extracted word? I rewrote your code so that it would work, but I don't know if I want to give it to you because it has the very real possibility of helping you pass the course, and I don't think we need another clueless programmer running around writing crappy code.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001Please nooo not another clueless programmer! there are enough in the world at the moment, can we put them all in one place and just push the barge away so they float away out of harms way.. preferablly with no internet connection
-
his footer says " the quieter u become more u hear " he's absolutely right: don't give all the info too soon
<< Nearly all men can stand adversity, but if you want to test a man's character, give him power. >>
-
if possible antbody help me... do no wat error it contains using System; using System.Collections.Generic; using System.Linq; using System.Text; class MainClass { public static void Main() { int tokenindex = 0; int cntTokens = 0; int iSymbol = -1; int prevDictSymbol = -1; char[] strToken = new char[512]; int i=0; string[] arr = { "Hello", "World" }; while (arr[0] != null) { tokenindex = 0; while ((arr[0] != ' ') && (arr[0] != ',') && (arr[0] != ';') && (arr[0] != '/') && (arr[0] != '#') && (arr[0] != '\0') && (arr[0] != '&') && (arr[0] != '-')) strToken[tokenindex++] = arr[0]; arr++; strToken[tokenindex] = '\0'; } Console.WriteLine(" The Token is:", strToken); Console.WriteLine("The Length of strToken", strToken); } }
the quieter u become more u hear
Well in amongst all the flames and elitist comments. I'll assume your a complete n00b and help you out a bit. but I gotta be honest, it was glaringly obvious. using System; using System.Collections.Generic; using System.Linq; using System.Text; class MainClass { int tokenindex = 0; int cntTokens = 0; int iSymbol = -1; int prevDictSymbol = -1; char[] strToken = new char[512]; int i=0; string[] arr = { "Hello", "World" }; public static void Main() { while ((arr[0] != null)&(arr[0]!= ' ')&&(arr[0] != ',')&(arr[0] != ';')&&(arr[0] != '/')&&(arr[0] != '#')&&(arr[0] != '\0')&&(arr[0] != '&')&&(arr[0] != '-')) { tokenindex = 0; strToken[tokenindex++] = arr[0]; arr++; strToken[tokenindex] = '\0'; } Console.WriteLine(" The Token is:", strToken); Console.WriteLine("The Length of strToken", strToken); } } aaarghhh! too many ands. That's as much am I'm going to do, the rest is up to you.
modified on Monday, January 26, 2009 2:51 PM