I\'m trying to convert a piece of code from Java to C and I got stuck here, trying to get a character at each position.
char ch;
line += \' \';
while (pos
in C, the easiest way to get a char from an array of character (I.E. a string)
given the variables in your posted code,
char ch;
line += ' ';
while (pos < line.length())
{
ch = line.charAt(pos);
...
line[]
array for another characterwould become:
#include
strcat( line, " ");
size_t maxPos = strlen( line );
for( pos = 0; pos < maxPos; pos++ )
{
ch = line[pos];
....