K
K
kill942015-11-08 15:29:56
C++ / C#
kill94, 2015-11-08 15:29:56

What's wrong with assigning an element from a string array to a string variable?

string Str2 = Str[(f + l) /2 ];
after this action Str2 is always empty. Str has lines

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Tsilyurik, 2015-11-08
@Olej

Show the full example, not what you think about it ;-)...
What is Str, and what is there in Str, and what is f, etc.

I
Innokenty Krivonosov, 2015-11-08
@Innk

Try this first and draw your own conclusions.
The snag is most likely in (f + l) /2.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question