if suppose my "strarr" char array holds the following text
(i.e.)
strarr()="text0 \text1/ text2 text3
i wanted the text which is enclosed within \ /
so the index of \ is x and the index of / is y
s = x+1
en = y-1
the text which i want is between the index value s & en now ..
to copy it to a separate char array "usern()" i do the foll but i get an error as \
"variable 'usern' is used before it is been declared"
dim j As Integer = 0
for i As Integer = s to en
usern(j)=strarr(i)
j+=1
Next
1 Replies - 125 Views - Last Post: 15 January 2013 - 08:01 AM
#1
error while copying some text from a char array to another char array
Posted 14 January 2013 - 11:39 PM
Replies To: error while copying some text from a char array to another char array
#2
Re: error while copying some text from a char array to another char array
Posted 15 January 2013 - 08:01 AM
Quote
"variable 'usern' is used before it is been declared"
That exactly explains what is going on. You need to declare (aka 'dim') the object 'usern'. You declared a variable 'j' so this shouldn't be a stretch to understand how to do that.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote







|