hi,
I'm trying to write a code to read an input string (InputReaded) and divide it into 2 different string;
the first one (Operazione) is maden up of the characters befor '('; the second one (Parentesi) is maden up of the characters between the '(' and ')'.
I can read the input using scanf() and i can copy che characters before '(' in the string called 'Operazione', but when i try to copy the characters between '(' and ')' in the string called 'Parentesi' i fuound difficults.
The problem is I can't copy the character, in fact when i try to print the string 'Parentesi' it's empty.
the code i use is:
becouse strncpy() copy the first n characters of a string in another string.
But it can't copy the last n characters...or am I wrong?
strncpy() can ignore the first m characters of a string and copy the following n characters into another string?
I need to delete the first m characters from my string 'InputReaded' and then use strncpy(), right?