Assuming I have a word:
char[1000]={"ALGUMA COISA,ALGO=TESTE,FIM"};
The word before = and itself = are optional in the sentence;
How do I store the word SOMETHING in a variable?
The code below is what I tried, but it is not working:
#include<stdio.h>
#include<string.h>
int main(){
char linha[1000]={"ALGUMA COISA,ALGO=TESTE,FIM"};'
char personagem[1000];
int ww=0;
int w1=0;
int je=0;
while(linha[w1]!='#include<stdio.h>
#include<string.h>
int main(){
char linha[1000]={"ALGUMA COISA,ALGO=TESTE,FIM"};'
char personagem[1000];
int ww=0;
int w1=0;
int je=0;
while(linha[w1]!='%pre%')
{
if(linha[w1]=='=')
{
for(ww=w1;ww>0;ww--)
{
personagem[je]=linha[ww];
je++;
}
}
w1++;
}
personagem[je]='%pre%';
}
')
{
if(linha[w1]=='=')
{
for(ww=w1;ww>0;ww--)
{
personagem[je]=linha[ww];
je++;
}
}
w1++;
}
personagem[je]='%pre%';
}
Assuming that w1 is the position found "=";